Message ID | 20240825143428.556439-1-dario.binacchi@amarulasolutions.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Hello, On Sun, Aug 25, 2024 at 04:34:00PM +0200, Dario Binacchi wrote: > 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> Another improvement worth mentioning is that the new output mentions the error code returned by clk_bulk_prepare_enable(). If you respin this series you might want to consider adding that to the commit log. Even without that added: Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Best regards Uwe To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
On Sun, 25 Aug 2024 at 16:34, Dario Binacchi <dario.binacchi@amarulasolutions.com> wrote: > > 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> Applied for next, thanks! Kind regards Uffe > > --- > > 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 > To unsubscribe from this group and stop receiving emails from it, send an email to linux-amarula+unsubscribe@amarulasolutions.com.
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);
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(-)