[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240825-reset-cleanup-scoped-v1-4-03f6d834f8c0@linaro.org>
Date: Sun, 25 Aug 2024 16:14:27 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Philipp Zabel <p.zabel@...gutronix.de>,
Antoine Tenart <atenart@...nel.org>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Damien Le Moal <dlemoal@...nel.org>,
Palmer Dabbelt <palmerdabbelt@...gle.com>,
Vladimir Zapolskiy <vz@...ia.com>
Cc: linux-kernel@...r.kernel.org, Damien Le Moal <damien.lemoal@....com>,
linux-riscv@...ts.infradead.org, linux-arm-kernel@...ts.infradead.org,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH 4/5] reset: lpc18xx: simplify with dev_err_probe()
Use dev_err_probe() to avoid dmesg flood on actual defer. This makes
the code also simpler.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
---
drivers/reset/reset-lpc18xx.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/reset/reset-lpc18xx.c b/drivers/reset/reset-lpc18xx.c
index 28fb85772b3e..e7896e3f1851 100644
--- a/drivers/reset/reset-lpc18xx.c
+++ b/drivers/reset/reset-lpc18xx.c
@@ -151,16 +151,14 @@ static int lpc18xx_rgu_probe(struct platform_device *pdev)
return PTR_ERR(rc->base);
rc->clk_reg = devm_clk_get(&pdev->dev, "reg");
- if (IS_ERR(rc->clk_reg)) {
- dev_err(&pdev->dev, "reg clock not found\n");
- return PTR_ERR(rc->clk_reg);
- }
+ if (IS_ERR(rc->clk_reg))
+ return dev_err_probe(&pdev->dev, PTR_ERR(rc->clk_reg),
+ "reg clock not found\n");
rc->clk_delay = devm_clk_get(&pdev->dev, "delay");
- if (IS_ERR(rc->clk_delay)) {
- dev_err(&pdev->dev, "delay clock not found\n");
- return PTR_ERR(rc->clk_delay);
- }
+ if (IS_ERR(rc->clk_delay))
+ return dev_err_probe(&pdev->dev, PTR_ERR(rc->clk_delay),
+ "delay clock not found\n");
ret = clk_prepare_enable(rc->clk_reg);
if (ret) {
--
2.43.0
Powered by blists - more mailing lists