From 41f2148a67f28803d64bf5ff538591af90a5ab57 Mon Sep 17 00:00:00 2001 From: Jesper Juhl Date: Sat, 25 Jun 2005 14:55:20 -0700 Subject: [PATCH] uml: kfree cleanup 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 Signed-off-by: Jeff Dike Cc: Paolo Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/drivers/daemon_user.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/um/drivers/daemon_user.c b/arch/um/drivers/daemon_user.c index cf15b4a8b517..c1b03f7c1daa 100644 --- a/arch/um/drivers/daemon_user.c +++ b/arch/um/drivers/daemon_user.c @@ -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) -- cgit v1.2.3