mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/3] pmdomain: imx93-pd: replace dev_err() with dev_err_probe()
@ 2024-08-25 14:34 Dario Binacchi
  2024-08-25 14:34 ` [PATCH v2 2/3] pmdomain: imx93-pd: don't unprepare clocks on driver remove Dario Binacchi
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Dario Binacchi @ 2024-08-25 14:34 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-amarula, Dario Binacchi, Arnd Bergmann, Fabio Estevam,
	Linus Walleij, Peng Fan, Pengutronix Kernel Team, Sascha Hauer,
	Shawn Guo, Ulf Hansson, Uwe Kleine-König, imx,
	linux-arm-kernel, linux-pm

This way, the code becomes more compact, and dev_err_probe() is used in
every error path of the probe() function.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>

---

Changes in v2:
- Drop the extra { } to be even more compact.

 drivers/pmdomain/imx/imx93-pd.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/pmdomain/imx/imx93-pd.c b/drivers/pmdomain/imx/imx93-pd.c
index d750a7dc58d2..44daecbe5cc3 100644
--- a/drivers/pmdomain/imx/imx93-pd.c
+++ b/drivers/pmdomain/imx/imx93-pd.c
@@ -125,11 +125,10 @@ static int imx93_pd_probe(struct platform_device *pdev)
 	/* Just to sync the status of hardware */
 	if (!domain->init_off) {
 		ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks);
-		if (ret) {
-			dev_err(domain->dev, "failed to enable clocks for domain: %s\n",
-				domain->genpd.name);
-			return ret;
-		}
+		if (ret)
+			return dev_err_probe(domain->dev, ret,
+					     "failed to enable clocks for domain: %s\n",
+					     domain->genpd.name);
 	}
 
 	ret = pm_genpd_init(&domain->genpd, NULL, domain->init_off);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-13 12:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-25 14:34 [PATCH v2 1/3] pmdomain: imx93-pd: replace dev_err() with dev_err_probe() Dario Binacchi
2024-08-25 14:34 ` [PATCH v2 2/3] pmdomain: imx93-pd: don't unprepare clocks on driver remove Dario Binacchi
2024-09-13 12:01   ` Ulf Hansson
2024-08-25 14:34 ` [PATCH v2 3/3] pmdomain: imx93-pd: drop the context variable "init_off" Dario Binacchi
2024-09-13 12:01   ` Ulf Hansson
2024-09-03 16:26 ` [PATCH v2 1/3] pmdomain: imx93-pd: replace dev_err() with dev_err_probe() Uwe Kleine-König
2024-09-13 12:01 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®