projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cf1138
)
coresight: Remove redundant null pointer check before of_node_put and put_device
author
zhong jiang
<
[email protected]
>
Thu, 20 Sep 2018 19:18:19 +0000
(13:18 -0600)
committer
Greg Kroah-Hartman
<
[email protected]
>
Tue, 25 Sep 2018 18:09:19 +0000
(20:09 +0200)
of_node_put and put_device has taken the null pointer check into account.
So it is safe to remove the duplicated check.
Signed-off-by: zhong jiang <
[email protected]
>
Signed-off-by: Mathieu Poirier <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/hwtracing/coresight/of_coresight.c
patch
|
blob
|
history
diff --git
a/drivers/hwtracing/coresight/of_coresight.c
b/drivers/hwtracing/coresight/of_coresight.c
index da71c975e3f7cef9a613f160df7542f4afe8a1f8..89092f83567e851be4f2d4182ece9d196e8a06c8 100644
(file)
--- a/
drivers/hwtracing/coresight/of_coresight.c
+++ b/
drivers/hwtracing/coresight/of_coresight.c
@@
-219,12
+219,9
@@
static int of_coresight_parse_endpoint(struct device *dev,
ret = 1;
} while (0);
- if (rparent)
- of_node_put(rparent);
- if (rep)
- of_node_put(rep);
- if (rdev)
- put_device(rdev);
+ of_node_put(rparent);
+ of_node_put(rep);
+ put_device(rdev);
return ret;
}