Commit fef6ec8d authored by Jesper Juhl's avatar Jesper Juhl Committed by Greg Kroah-Hartman

[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: default avatarJesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ceaeade1
...@@ -299,10 +299,8 @@ static void class_dev_release(struct kobject * kobj) ...@@ -299,10 +299,8 @@ static void class_dev_release(struct kobject * kobj)
pr_debug("device class '%s': release.\n", cd->class_id); pr_debug("device class '%s': release.\n", cd->class_id);
if (cd->devt_attr) {
kfree(cd->devt_attr); kfree(cd->devt_attr);
cd->devt_attr = NULL; cd->devt_attr = NULL;
}
if (cls->release) if (cls->release)
cls->release(cd); cls->release(cd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment