diff options
author | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-08-23 12:15:59 +0200 |
---|---|---|
committer | Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> | 2024-08-25 11:02:15 +0200 |
commit | 8f3cb397cbc1e3b18081738af87171f960bd112e (patch) | |
tree | 510be142fa8ca274c0cfba4ba7e1e4adff853a3b /drivers/memory | |
parent | c93ad423edd8a42a6666241595043f9193469f9e (diff) |
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: Jonathan Cameron <Jonathan.Cameron@huwei.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Link: https://lore.kernel.org/r/20240823-b4-cleanup-h-guard-v1-4-01668915bd55@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Diffstat (limited to 'drivers/memory')
-rw-r--r-- | drivers/memory/pl172.c | 7 |
1 files 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) { |