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:
29b4817
)
of: Delete an unnecessary check before the function call "of_node_put"
author
Markus Elfring
<elfring@users.sourceforge.net>
Tue, 19 Jul 2016 20:42:22 +0000
(22:42 +0200)
committer
Rob Herring
<robh@kernel.org>
Tue, 9 Aug 2016 17:36:27 +0000
(12:36 -0500)
The of_node_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: Rob Herring <robh@kernel.org>
drivers/of/base.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/of/base.c
b/drivers/of/base.c
index 7792266db2597b29f8158d87fdb61904eec64fe4..cb255a07baa0f8c682f15f82f0c36e22052fa754 100644
(file)
--- a/
drivers/of/base.c
+++ b/
drivers/of/base.c
@@
-1631,8
+1631,7
@@
static int __of_parse_phandle_with_args(const struct device_node *np,
*/
err:
- if (it.node)
- of_node_put(it.node);
+ of_node_put(it.node);
return rc;
}