tmp_suning_uos_patched/sound/aoa
Julia Lawall f065fabc86 ALSA: sound/aoa: Add kmalloc NULL tests
Check that the result of kzalloc is not NULL before a dereference.

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
expression *x;
identifier f;
constant char *C;
@@

x = \(kmalloc\|kcalloc\|kzalloc\)(...);
... when != x == NULL
    when != x != NULL
    when != (x || ...)
(
kfree(x)
|
f(...,C,...,x,...)
|
*f(...,x,...)
|
*x->f
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2009-07-31 10:14:58 +02:00
..
codecs ALSA: AOA: Convert onyx and tas codecs to new-style i2c drivers 2009-04-21 07:31:48 +02:00
core ALSA: sound/aoa: Add kmalloc NULL tests 2009-07-31 10:14:58 +02:00
fabrics sound: remove driver_data direct access of struct device 2009-05-12 09:20:54 +02:00
soundbus sound: remove driver_data direct access of struct device 2009-05-12 09:20:54 +02:00
aoa-gpio.h ALSA: snd-aoa: handle master-amp if present 2009-01-15 18:28:37 +01:00
aoa.h [ALSA] Remove sound/driver.h 2008-01-31 17:29:48 +01:00
Kconfig sound: Convert to menuconfig 2008-05-27 15:56:20 +02:00
Makefile [PATCH] aoa: fix when all is built into the kernel 2006-07-10 13:24:19 -07:00