summaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2020-07-24 10:40:25 +0300
committerKrzysztof Kozlowski <krzk@kernel.org>2020-08-17 21:43:50 +0300
commit3cd7040762a4727894f5f4bbb25550dc6f557ea7 (patch)
treee7dee3974d60b8c586cbe4f8092b3887cf440091 /drivers/memory
parentdc1a9283f16a5c5c08a3d3b473e43a826ec3a177 (diff)
downloadlinux-3cd7040762a4727894f5f4bbb25550dc6f557ea7.tar.xz
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@kernel.org> Link: https://lore.kernel.org/r/20200724074038.5597-17-krzk@kernel.org
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/renesas-rpc-if.c4
1 files changed, 1 insertions, 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);