Commit 8f3cb397 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski

memory: pl172: 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@huwei.com>
Reviewed-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-4-01668915bd55@linaro.orgSigned-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
parent c93ad423
......@@ -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) {
......
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