Commit 3f2c420596be57e74719bd09333d3b5efe90341d

Authored by zhengbin
Committed by Tony Lindgren
1 parent 426d4447f9

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>

Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff

drivers/bus/ti-sysc.c
... ... @@ -503,10 +503,8 @@
503 503 {
504 504 ddata->rsts =
505 505 devm_reset_control_get_optional_shared(ddata->dev, "rstctrl");
506   - if (IS_ERR(ddata->rsts))
507   - return PTR_ERR(ddata->rsts);
508 506  
509   - return 0;
  507 + return PTR_ERR_OR_ZERO(ddata->rsts);
510 508 }
511 509  
512 510 /**