mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] small cleanup; remove check for NULL before kfree() in driver core
@ 2005-08-17 20:06 Jesper Juhl
  0 siblings, 0 replies; only message in thread
From: Jesper Juhl @ 2005-08-17 20:06 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Maneesh Soni, lkml

Remove needless checking of variable for NULL before calling kfree() on it.
Applies to 2.6.13-rc6-git9

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---

 drivers/base/class.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

--- linux-2.6.13-rc6-git9-orig/drivers/base/class.c	2005-08-17 21:53:53.000000000 +0200
+++ linux-2.6.13-rc6-git9/drivers/base/class.c	2005-08-17 21:57:26.000000000 +0200
@@ -299,10 +299,8 @@ static void class_dev_release(struct kob
 
 	pr_debug("device class '%s': release.\n", cd->class_id);
 
-	if (cd->devt_attr) {
-		kfree(cd->devt_attr);
-		cd->devt_attr = NULL;
-	}
+	kfree(cd->devt_attr);
+	cd->devt_attr = NULL;
 
 	if (cls->release)
 		cls->release(cd);




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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-17 20:06 [PATCH] small cleanup; remove check for NULL before kfree() in driver core Jesper Juhl

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®