summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-08-17 22:06:34 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-05 16:03:13 -0700
commitfef6ec8dd96205fb22e3cfe2e4abd69d89413631 (patch)
tree8c38a91106351c8af46916d73898c79f741f8654 /drivers/base
parentceaeade1f94c0a1c0163906ceeaede6493a9715e (diff)
downloadlinux-fef6ec8dd96205fb22e3cfe2e4abd69d89413631.tar.gz
linux-fef6ec8dd96205fb22e3cfe2e4abd69d89413631.tar.bz2
linux-fef6ec8dd96205fb22e3cfe2e4abd69d89413631.zip
[PATCH] Driver core: small cleanup; remove check for NULL before kfree() in driver core
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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/class.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index d207296b18dc..d164c32a97ad 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -299,10 +299,8 @@ static void class_dev_release(struct kobject * kobj)
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);