diff options
author | Richard Knutsson <ricknu-0@student.ltu.se> | 2007-05-14 04:38:57 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-07-20 05:11:14 -0400 |
commit | c111b8de975a357ff58e73047e9af48afacf2347 (patch) | |
tree | a0332849bf8c3ad7df2bc73859b06265c888e1b2 /sound/usb/usx2y | |
parent | 500bec3d2ba4787e6ab110d159b2926093c27304 (diff) |
[ALSA] usbusx2yaudio: kfree(NULL) is valid
if (!x) kfree(x); is not needed since kfree(NULL) is valid.
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/usb/usx2y')
-rw-r--r-- | sound/usb/usx2y/usbusx2yaudio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/usb/usx2y/usbusx2yaudio.c b/sound/usb/usx2y/usbusx2yaudio.c index 0a352e46862f..48e9aa3f18c9 100644 --- a/sound/usb/usx2y/usbusx2yaudio.c +++ b/sound/usb/usx2y/usbusx2yaudio.c | |||
@@ -935,10 +935,9 @@ static struct snd_pcm_ops snd_usX2Y_pcm_ops = | |||
935 | */ | 935 | */ |
936 | static void usX2Y_audio_stream_free(struct snd_usX2Y_substream **usX2Y_substream) | 936 | static void usX2Y_audio_stream_free(struct snd_usX2Y_substream **usX2Y_substream) |
937 | { | 937 | { |
938 | if (NULL != usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]) { | 938 | kfree(usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]); |
939 | kfree(usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]); | 939 | usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK] = NULL; |
940 | usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK] = NULL; | 940 | |
941 | } | ||
942 | kfree(usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]); | 941 | kfree(usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]); |
943 | usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE] = NULL; | 942 | usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE] = NULL; |
944 | } | 943 | } |