From 09417379be9b126e10ae7dcd7afc20b666146266 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Sat, 25 Jun 2005 14:58:49 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- sound/oss/sb_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sound/oss/sb_common.c') diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c index ce359e6c933a..5f955e3d2e26 100644 --- a/sound/oss/sb_common.c +++ b/sound/oss/sb_common.c @@ -915,8 +915,8 @@ void sb_dsp_unload(struct address_info *hw_config, int sbmpu) } else release_region(hw_config->io_base, 16); - if(detected_devc) - kfree(detected_devc); + + kfree(detected_devc); } /* -- cgit v1.2.3