mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2/8] UML - kfree cleanup
@ 2005-06-20 18:51 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2005-06-20 18:51 UTC (permalink / raw)
  To: akpm, torvalds; +Cc: linux-kernel, user-mode-linux-devel, juhl-lkml

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>

Index: linux-2.6.12/arch/um/drivers/daemon_user.c
===================================================================
--- linux-2.6.12.orig/arch/um/drivers/daemon_user.c	2005-06-19 21:11:24.000000000 -0400
+++ linux-2.6.12/arch/um/drivers/daemon_user.c	2005-06-19 21:35:38.000000000 -0400
@@ -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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-20 19:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-20 18:51 [PATCH 2/8] UML - kfree cleanup Jeff Dike

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®