summaryrefslogtreecommitdiffstats
path: root/sound/oss/mpu401.c
diff options
context:
space:
mode:
authorJesper Juhl2005-06-25 23:58:49 +0200
committerLinus Torvalds2005-06-26 01:25:00 +0200
commit09417379be9b126e10ae7dcd7afc20b666146266 (patch)
tree0236f4cb1afb4cf9a7f13b67e6ac639c55fa0440 /sound/oss/mpu401.c
parent[PATCH] get rid of redundant NULL checks before kfree() in arch/i386/ (diff)
downloadkernel-qcow2-linux-09417379be9b126e10ae7dcd7afc20b666146266.tar.gz
kernel-qcow2-linux-09417379be9b126e10ae7dcd7afc20b666146266.tar.xz
kernel-qcow2-linux-09417379be9b126e10ae7dcd7afc20b666146266.zip
[PATCH] remove redundant NULL checks before kfree() in sound/ and avoid casting pointers about to be kfree()'ed
Checking a pointer for NULL before calling kfree() on it is redundant, kfree() deals with NULL pointers just fine. This patch removes such checks from sound/ This patch also makes another, but closely related, change. It avoids casting pointers about to be kfree()'ed. Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'sound/oss/mpu401.c')
-rw-r--r--sound/oss/mpu401.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c
index b66f53fa8db0..0aac54c68f01 100644
--- a/sound/oss/mpu401.c
+++ b/sound/oss/mpu401.c
@@ -1240,8 +1240,7 @@ void unload_mpu401(struct address_info *hw_config)
p=mpu401_synth_operations[n];
sound_unload_mididev(n);
sound_unload_timerdev(hw_config->slots[2]);
- if(p)
- kfree(p);
+ kfree(p);
}
}