summaryrefslogtreecommitdiffstats
path: root/sound/oss/ad1889.c
diff options
context:
space:
mode:
authorJesper Juhl <juhl-lkml@dif.dk>2005-06-25 14:58:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 16:25:00 -0700
commit09417379be9b126e10ae7dcd7afc20b666146266 (patch)
tree0236f4cb1afb4cf9a7f13b67e6ac639c55fa0440 /sound/oss/ad1889.c
parent4ae6673e029d609da7ef4311440d6de501d6967a (diff)
downloadblackbird-op-linux-09417379be9b126e10ae7dcd7afc20b666146266.tar.gz
blackbird-op-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/ad1889.c')
-rw-r--r--sound/oss/ad1889.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c
index b767c621fd09..2cfd214e4c2a 100644
--- a/sound/oss/ad1889.c
+++ b/sound/oss/ad1889.c
@@ -277,8 +277,7 @@ static void ad1889_free_dev(ad1889_dev_t *dev)
for (j = 0; j < AD_MAX_STATES; j++) {
dmabuf = &dev->state[j].dmabuf;
- if (dmabuf->rawbuf != NULL)
- kfree(dmabuf->rawbuf);
+ kfree(dmabuf->rawbuf);
}
kfree(dev);
OpenPOWER on IntegriCloud