[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>
This commit is contained in:
parent
ceaeade1f9
commit
fef6ec8dd9
1 changed files with 2 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue