projects
/
GitHub
/
moto-9609
/
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:
2a52feb
)
ALSA: hda: Delete an unnecessary check before the function call "kobject_put"
author
Markus Elfring
<elfring@users.sourceforge.net>
Wed, 8 Jul 2015 19:26:02 +0000
(21:26 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Thu, 9 Jul 2015 12:20:27 +0000
(14:20 +0200)
The kobject_put() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/hda/hdac_sysfs.c
patch
|
blob
|
blame
|
history
diff --git
a/sound/hda/hdac_sysfs.c
b/sound/hda/hdac_sysfs.c
index 0a6ce3b84cc474acb96ef435d02d7a7dfd926b42..089b35f6f1086e0081262927acb84866fe845e0b 100644
(file)
--- a/
sound/hda/hdac_sysfs.c
+++ b/
sound/hda/hdac_sysfs.c
@@
-321,8
+321,7
@@
static void widget_tree_free(struct hdac_device *codec)
free_widget_node(*p, &widget_node_group);
kfree(tree->nodes);
}
- if (tree->root)
- kobject_put(tree->root);
+ kobject_put(tree->root);
kfree(tree);
codec->widgets = NULL;
}