[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240830072747.11032-1-chenyufan@vivo.com>
Date: Fri, 30 Aug 2024 15:27:47 +0800
From: Chen Yufan <chenyufan@...o.com>
To: Emilio López <emilio@...pez.com.ar>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-sunxi@...ts.linux.dev,
linux-kernel@...r.kernel.org
Cc: opensource.kernel@...o.com,
Chen Yufan <chenyufan@...o.com>
Subject: [PATCH v1] clk: sunxi: sun9i-mmc: Use dev_err_probe() to simplfy code
Use dev_err_probe() can make code a bit simpler.
Signed-off-by: Chen Yufan <chenyufan@...o.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
Powered by blists - more mailing lists