acrn-kernel/sound/aoa/core
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
..
Makefile
alsa.c ALSA: Convert to snd_card_create() in other sound/* 2009-01-12 15:21:19 +01:00
alsa.h
core.c
gpio-feature.c ALSA: snd-aoa: handle master-amp if present 2009-01-15 18:28:37 +01:00
gpio-pmf.c ALSA: sound/aoa: Add kmalloc NULL tests 2009-07-31 10:14:58 +02:00