linux/sound/soc/at32
Julien Brunel 71dc525c5d ALSA: sound/soc/at32: Useless NULL test
The test (ssc != NULL) can only be reached if the call to the function
ssc_request, the result of which ssc is assigned, succeeds. Moreover,
two statements assign NULL to ssc just before a return, which is useless
since it is a local variable. So, we suggest to delete the test and
the two assignments.

A simplified version of the semantic match that finds this problem is
as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@bad_null_test@
expression x,E;
@@
x = ssc_request(...)
... when != x = E
* x != NULL
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2008-10-10 13:41:40 +02:00
..
Kconfig [ALSA] Revised AT32 ASoC Patch 2008-06-06 11:54:38 +02:00
Makefile [ALSA] Revised AT32 ASoC Patch 2008-06-06 11:54:38 +02:00
at32-pcm.c ALSA: ASoC: Fix at32-pcm build breakage with PM enabled 2008-09-22 12:14:28 +02:00
at32-pcm.h [ALSA] Revised AT32 ASoC Patch 2008-06-06 11:54:38 +02:00
at32-ssc.c ALSA: asoc: at32 - merge structs snd_soc_codec_dai and snd_soc_cpu_dai. 2008-07-10 09:32:34 +02:00
at32-ssc.h ALSA: asoc: at32 - merge structs snd_soc_codec_dai and snd_soc_cpu_dai. 2008-07-10 09:32:34 +02:00
playpaq_wm8510.c ALSA: sound/soc/at32: Useless NULL test 2008-10-10 13:41:40 +02:00