Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR

Signed-off-by: YueHaibing <yuehaib...@huawei.com>
---
 drivers/bus/ti-sysc.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index b696f26a3894..2b93be2882f3 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -432,10 +432,7 @@ static int sysc_init_resets(struct sysc *ddata)
 {
        ddata->rsts =
                devm_reset_control_array_get_optional_exclusive(ddata->dev);
-       if (IS_ERR(ddata->rsts))
-               return PTR_ERR(ddata->rsts);
-
-       return 0;
+       return PTR_ERR_OR_ZERO(ddata->rsts);
 }
 
 /**





Reply via email to