projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
426d444
)
bus: ti-sysc: Use PTR_ERR_OR_ZERO() to simplify code
author
zhengbin
<zhengbin13@huawei.com>
Mon, 18 Nov 2019 10:37:32 +0000
(18:37 +0800)
committer
Tony Lindgren
<tony@atomide.com>
Thu, 12 Dec 2019 17:06:40 +0000
(09:06 -0800)
Fixes coccicheck warning:
drivers/bus/ti-sysc.c:506:1-3: WARNING: PTR_ERR_OR_ZERO can be used
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/bus/ti-sysc.c
patch
|
blob
|
history
diff --git
a/drivers/bus/ti-sysc.c
b/drivers/bus/ti-sysc.c
index 78f90c6cd5799e1075d6124c4c0834a4b7fa96c7..c915ac30079531aba65cec5615db62b92def6866 100644
(file)
--- a/
drivers/bus/ti-sysc.c
+++ b/
drivers/bus/ti-sysc.c
@@
-503,10
+503,8
@@
static int sysc_init_resets(struct sysc *ddata)
{
ddata->rsts =
devm_reset_control_get_optional_shared(ddata->dev, "rstctrl");
- if (IS_ERR(ddata->rsts))
- return PTR_ERR(ddata->rsts);
- return
0
;
+ return
PTR_ERR_OR_ZERO(ddata->rsts)
;
}
/**