Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pmdomain: imx: gpcv2: replace dev_err() with dev_err_probe()

The patch standardizes the probe() code by replacing the two occurrences
of dev_err() with dev_err_probe(). Indeed, dev_err_probe() was used in all
other error paths of the probe() function.
Note that dev_err_probe() has advantages even if the error code is not
EPROBE_DEFER, such as the symbolic output of the error code. Therefore,
it should generally be preferred over dev_err().

Co-developed-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Marco Felsch <m.felsch@pengutronix.de>
Message-ID: <20241025160430.4113467-1-dario.binacchi@amarulasolutions.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Dario Binacchi and committed by
Ulf Hansson
da3d242c 88e98cd5

+2 -2
+2 -2
drivers/pmdomain/imx/gpcv2.c
··· 1356 1356 1357 1357 ret = pm_genpd_init(&domain->genpd, NULL, true); 1358 1358 if (ret) { 1359 - dev_err(domain->dev, "Failed to init power domain\n"); 1359 + dev_err_probe(domain->dev, ret, "Failed to init power domain\n"); 1360 1360 goto out_domain_unmap; 1361 1361 } 1362 1362 ··· 1367 1367 ret = of_genpd_add_provider_simple(domain->dev->of_node, 1368 1368 &domain->genpd); 1369 1369 if (ret) { 1370 - dev_err(domain->dev, "Failed to add genpd provider\n"); 1370 + dev_err_probe(domain->dev, ret, "Failed to add genpd provider\n"); 1371 1371 goto out_genpd_remove; 1372 1372 } 1373 1373