projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
500bec3
)
[ALSA] usbusx2yaudio: kfree(NULL) is valid
author
Richard Knutsson
<
[email protected]
>
Mon, 14 May 2007 08:38:57 +0000
(10:38 +0200)
committer
Jaroslav Kysela
<
[email protected]
>
Fri, 20 Jul 2007 09:11:14 +0000
(11:11 +0200)
if (!x) kfree(x); is not needed since kfree(NULL) is valid.
Signed-off-by: Richard Knutsson <
[email protected]
>
Signed-off-by: Takashi Iwai <
[email protected]
>
Signed-off-by: Jaroslav Kysela <
[email protected]
>
sound/usb/usx2y/usbusx2yaudio.c
patch
|
blob
|
history
diff --git
a/sound/usb/usx2y/usbusx2yaudio.c
b/sound/usb/usx2y/usbusx2yaudio.c
index 0a352e46862f37abbdc1b94c2475f8d185e99d63..48e9aa3f18c94ac7dc3ecd57b53bfd749e9c3779 100644
(file)
--- 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 =
*/
static void usX2Y_audio_stream_free(struct snd_usX2Y_substream **usX2Y_substream)
{
- if (NULL != usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]) {
- kfree(usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]);
- usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK] = NULL;
- }
+ kfree(usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK]);
+ usX2Y_substream[SNDRV_PCM_STREAM_PLAYBACK] = NULL;
+
kfree(usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE]);
usX2Y_substream[SNDRV_PCM_STREAM_CAPTURE] = NULL;
}