[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200724074038.5597-17-krzk@kernel.org>
Date: Fri, 24 Jul 2020 09:40:25 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
Markus Mayer <mmayer@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Florian Fainelli <f.fainelli@...il.com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Roger Quadros <rogerq@...com>,
Tony Lindgren <tony@...mide.com>,
Vladimir Zapolskiy <vz@...ia.com>,
Kukjin Kim <kgene@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-omap@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-tegra@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Krzysztof Kozlowski <krzk@...nel.org>
Subject: [PATCH v2 16/29] memory: renesas-rpc-if: Simplify with PTR_ERR_OR_ZERO
Use PTR_ERR_OR_ZERO to make the code a little bit simpler.
Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
---
drivers/memory/renesas-rpc-if.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/memory/renesas-rpc-if.c b/drivers/memory/renesas-rpc-if.c
index 88f51ec8f1d1..f2a33a1af836 100644
--- a/drivers/memory/renesas-rpc-if.c
+++ b/drivers/memory/renesas-rpc-if.c
@@ -199,10 +199,8 @@ int rpcif_sw_init(struct rpcif *rpc, struct device *dev)
rpc->dirmap = NULL;
rpc->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
- if (IS_ERR(rpc->rstc))
- return PTR_ERR(rpc->rstc);
- return 0;
+ return PTR_ERR_OR_ZERO(rpc->rstc);
}
EXPORT_SYMBOL(rpcif_sw_init);
--
2.17.1
Powered by blists - more mailing lists