]> err.no Git - linux-2.6/commitdiff
[PATCH] uml: kfree cleanup
authorJesper Juhl <juhl-lkml@dif.dk>
Sat, 25 Jun 2005 21:55:20 +0000 (14:55 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 25 Jun 2005 23:24:35 +0000 (16:24 -0700)
Here's a small patch to remove a few unnessesary NULL pointer checks before
kfree() in arch/um/drivers/daemon_user.c

Signed-off-by: Jesper Juhl <juhl-lkml@dif.dk>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/daemon_user.c

index cf15b4a8b517556c1f498822b24c0a8af79d57a7..c1b03f7c1daa962195a6e8ee26d09580abfab615 100644 (file)
@@ -157,9 +157,9 @@ static void daemon_remove(void *data)
 
        os_close_file(pri->fd);
        os_close_file(pri->control);
-       if(pri->data_addr != NULL) kfree(pri->data_addr);
-       if(pri->ctl_addr != NULL) kfree(pri->ctl_addr);
-       if(pri->local_addr != NULL) kfree(pri->local_addr);
+       kfree(pri->data_addr);
+       kfree(pri->ctl_addr);
+       kfree(pri->local_addr);
 }
 
 int daemon_user_write(int fd, void *buf, int len, struct daemon_data *pri)