[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190411024708.123605-1-yuehaibing@huawei.com>
Date: Thu, 11 Apr 2019 02:47:08 +0000
From: YueHaibing <yuehaibing@...wei.com>
To: Faiz Abbas <faiz_abbas@...com>, Tony Lindgren <tony@...mide.com>,
"Rob Herring" <robh@...nel.org>
CC: YueHaibing <yuehaibing@...wei.com>, <linux-kernel@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>
Subject: [PATCH -next] bus: ti-sysc: Use PTR_ERR_OR_ZERO in sysc_init_resets()
Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR
Signed-off-by: YueHaibing <yuehaibing@...wei.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);
}
/**
Powered by blists - more mailing lists