summaryrefslogtreecommitdiff
path: root/drivers/memory
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-08-16 12:54:35 +0200
committerKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-08-21 13:41:00 +0200
commit82986f5cdd23756e7e0c4fa9e4f590f7516772e9 (patch)
tree9ca92f5077b94cda4de90e8b7328974f9c1d8008 /drivers/memory
parentc7f67fec177484fd4f7836e832e66e77fa25700f (diff)
memory: ti-aemif: simplify with dev_err_probe()
Use dev_err_probe() to avoid dmesg flood on actual defer. This makes the code also simpler. Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-11-9eed0ee16b78@linaro.org Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r--drivers/memory/ti-aemif.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/memory/ti-aemif.c b/drivers/memory/ti-aemif.c
index 49e7cbe98fdb..a1f1922ea291 100644
--- a/drivers/memory/ti-aemif.c
+++ b/drivers/memory/ti-aemif.c
@@ -339,10 +339,9 @@ static int aemif_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, aemif);
aemif->clk = devm_clk_get_enabled(dev, NULL);
- if (IS_ERR(aemif->clk)) {
- dev_err(dev, "cannot get clock 'aemif'\n");
- return PTR_ERR(aemif->clk);
- }
+ if (IS_ERR(aemif->clk))
+ return dev_err_probe(dev, PTR_ERR(aemif->clk),
+ "cannot get clock 'aemif'\n");
aemif->clk_rate = clk_get_rate(aemif->clk) / MSEC_PER_SEC;