[PATCH v1] clk: sunxi: sun9i-mmc: Use dev_err_probe() to simplfy code
Chen Yufan
chenyufan at vivo.com
Fri Aug 30 00:27:47 PDT 2024
Use dev_err_probe() can make code a bit simpler.
Signed-off-by: Chen Yufan <chenyufan at vivo.com>
---
drivers/clk/sunxi/clk-sun9i-mmc.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c
index 91074017c04f..e6b62e421936 100644
--- a/drivers/clk/sunxi/clk-sun9i-mmc.c
+++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
@@ -134,10 +134,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
}
ret = reset_control_deassert(data->reset);
- if (ret) {
- dev_err(&pdev->dev, "Reset deassert err %d\n", ret);
- return ret;
- }
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret, "Reset deassert err %d\n");
clk_parent = __clk_get_name(data->clk);
for (i = 0; i < count; i++) {
--
2.39.0
More information about the linux-arm-kernel
mailing list