aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYe Xingchen <[email protected]>2023-03-24 10:16:26 +0800
committerNeil Armstrong <[email protected]>2023-03-27 09:49:21 +0200
commit78e812f0406c765fc5623b1d68e3c6e86cb32e5a (patch)
tree4762f64afe25788470dfe6e4bbcfd6b5fd646305
parent2227e738b30bf20380a48391a73752c52f5f5c6a (diff)
soc: amlogic: meson-pwrc: Use dev_err_probe()
Replace the open-code with dev_err_probe() to simplify the code. Signed-off-by: Ye Xingchen <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Reviewed-by: Martin Blumenstingl <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Neil Armstrong <[email protected]>
-rw-r--r--drivers/soc/amlogic/meson-gx-pwrc-vpu.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
index 312fd9afccb0..5d4f12800d93 100644
--- a/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
+++ b/drivers/soc/amlogic/meson-gx-pwrc-vpu.c
@@ -308,11 +308,9 @@ static int meson_gx_pwrc_vpu_probe(struct platform_device *pdev)
}
rstc = devm_reset_control_array_get_exclusive(&pdev->dev);
- if (IS_ERR(rstc)) {
- if (PTR_ERR(rstc) != -EPROBE_DEFER)
- dev_err(&pdev->dev, "failed to get reset lines\n");
- return PTR_ERR(rstc);
- }
+ if (IS_ERR(rstc))
+ return dev_err_probe(&pdev->dev, PTR_ERR(rstc),
+ "failed to get reset lines\n");
vpu_clk = devm_clk_get(&pdev->dev, "vpu");
if (IS_ERR(vpu_clk)) {