projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ceaeade
)
[PATCH] Driver core: small cleanup; remove check for NULL before kfree() in driver...
author
Jesper Juhl
<jesper.juhl@gmail.com>
Wed, 17 Aug 2005 20:06:34 +0000
(22:06 +0200)
committer
Greg Kroah-Hartman
<gregkh@suse.de>
Mon, 5 Sep 2005 23:03:13 +0000
(16:03 -0700)
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>
drivers/base/class.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/base/class.c
b/drivers/base/class.c
index d207296b18dcdf67dae96cd518215529b479a5cc..d164c32a97ad4e90426a4f1e8a244b8d5f7d93d3 100644
(file)
--- 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);