Skip to content

Commit 3f2c420

Browse files
zhengbin13tmlind
authored andcommitted
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 <[email protected]> Signed-off-by: zhengbin <[email protected]> Signed-off-by: Tony Lindgren <[email protected]>
1 parent 426d444 commit 3f2c420

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/bus/ti-sysc.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,8 @@ static int sysc_init_resets(struct sysc *ddata)
503503
{
504504
ddata->rsts =
505505
devm_reset_control_get_optional_shared(ddata->dev, "rstctrl");
506-
if (IS_ERR(ddata->rsts))
507-
return PTR_ERR(ddata->rsts);
508506

509-
return 0;
507+
return PTR_ERR_OR_ZERO(ddata->rsts);
510508
}
511509

512510
/**

0 commit comments

Comments
 (0)