1
linux/sound/drivers
Julia Lawall 4b3be6afa4 ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests
In pcm.c, if the NULL test on pcm is needed, then the dereference should be
after the NULL test.

In dummy.c and ali5451.c, the context of the calls to
snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
respectively cannot be NULL.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-10-30 12:01:27 +01:00
..
mpu401 ALSA: Convert to snd_card_create() in other sound/* 2009-01-12 15:21:19 +01:00
opl3 ALSA: opl3: circular locking in the snd_opl3_note_on() and snd_opl3_note_off() 2009-10-08 11:48:10 +02:00
opl4 ALSA: clean up the logic for building sequencer modules 2009-05-29 11:49:42 +02:00
pcsp ALSA: pcsp - Fix nforce workaround 2009-10-30 11:55:22 +01:00
vx Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00
dummy.c ALSA: sound: Move dereference after NULL test and drop unnecessary NULL tests 2009-10-30 12:01:27 +01:00
Kconfig x86: allow more than 8 cpus to be used on 32-bit 2009-01-30 00:20:22 +01:00
Makefile [ALSA] Add PC-speaker sound driver 2008-04-24 12:00:20 +02:00
ml403-ac97cr.c ALSA: Convert to snd_card_create() in other sound/* 2009-01-12 15:21:19 +01:00
mtpav.c Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00
mts64.c Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00
pcm-indirect2.c [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
pcm-indirect2.h [ALSA] Xilinx ML403 AC97 Controller Reference device driver 2008-01-31 17:29:15 +01:00
portman2x4.c ALSA: Convert to snd_card_create() in other sound/* 2009-01-12 15:21:19 +01:00
serial-u16550.c sound: serial-u16550: fix buffer overflow 2009-05-05 16:01:18 +02:00
virmidi.c Merge branch 'topic/misc' into for-linus 2009-03-24 00:35:50 +01:00