[PATCH 1/4] bus: ti-sysc: Use PTR_ERR_OR_ZERO rather than its implementation

From: zhong jiang
Date: Thu Sep 05 2019 - 02:46:28 EST


PTR_ERR_OR_ZERO contains if(IS_ERR(...)) + PTR_ERR. It is better to
use it directly. hence just replace it.

Signed-off-by: zhong jiang <zhongjiang@xxxxxxxxxx>
---
drivers/bus/ti-sysc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c
index 9207ac2..6f4c102 100644
--- a/drivers/bus/ti-sysc.c
+++ b/drivers/bus/ti-sysc.c
@@ -504,10 +504,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);
}

/**
--
1.7.12.4