tree 8c38a91106351c8af46916d73898c79f741f8654
parent ceaeade1f94c0a1c0163906ceeaede6493a9715e
author Jesper Juhl <[EMAIL PROTECTED]> Wed, 17 Aug 2005 22:06:34 +0200
committer Greg Kroah-Hartman <[EMAIL PROTECTED]> Tue, 06 Sep 2005 06:03:13 -0700

[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 <[EMAIL PROTECTED]>
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>

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

diff --git a/drivers/base/class.c b/drivers/base/class.c
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -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);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to