Thread (20 messages) 20 messages, 4 authors, 2024-08-25
STALE695d LANDED

[PATCH 4/7] memory: pl172: simplify with dev_err_probe()

From: Krzysztof Kozlowski <hidden>
Date: 2024-08-23 10:16:13
Also in: linux-omap, lkml
Subsystem: arm/lpc18xx architecture, memory controller drivers, the rest · Maintainers: Vladimir Zapolskiy, Krzysztof Kozlowski, Linus Torvalds

Use dev_err_probe() to avoid dmesg flood on actual defer.  This makes
the code also simpler.

Signed-off-by: Krzysztof Kozlowski <redacted>
---
 drivers/memory/pl172.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/memory/pl172.c b/drivers/memory/pl172.c
index 9eb8cc7de494..390012401f64 100644
--- a/drivers/memory/pl172.c
+++ b/drivers/memory/pl172.c
@@ -217,10 +217,9 @@ static int pl172_probe(struct amba_device *adev, const struct amba_id *id)
 		return -ENOMEM;
 
 	pl172->clk = devm_clk_get(dev, "mpmcclk");
-	if (IS_ERR(pl172->clk)) {
-		dev_err(dev, "no mpmcclk provided clock\n");
-		return PTR_ERR(pl172->clk);
-	}
+	if (IS_ERR(pl172->clk))
+		return dev_err_probe(dev, PTR_ERR(pl172->clk),
+				     "no mpmcclk provided clock\n");
 
 	ret = clk_prepare_enable(pl172->clk);
 	if (ret) {
-- 
2.43.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help