Commit 82986f5c authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski

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: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240816-cleanup-h-of-node-put-memory-v2-11-9eed0ee16b78@linaro.orgSigned-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
parent c7f67fec
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment