summaryrefslogtreecommitdiff
path: root/drivers/bus
diff options
context:
space:
mode:
authorzhengbin <zhengbin13@huawei.com>2019-11-18 18:37:32 +0800
committerTony Lindgren <tony@atomide.com>2019-12-12 09:06:40 -0800
commit3f2c420596be57e74719bd09333d3b5efe90341d (patch)
treedd587ae51dfde4a9910db57904e37653268c4f85 /drivers/bus
parent426d4447f92c7643a94269270bf71afa23618af1 (diff)
bus: ti-sysc: Use PTR_ERR_OR_ZERO() to simplify code
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>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/ti-sysc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 78f90c6cd579..c915ac300795 100644
--- 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);
}
/**