Skip to content

Commit

Permalink
bus: ti-sysc: Use PTR_ERR_OR_ZERO() to simplify code
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zhengbin authored and Tony Lindgren committed Dec 12, 2019
1 parent 426d444 commit 3f2c420
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/bus/ti-sysc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 3f2c420

Please sign in to comment.