pmdomain: imx: gpcv2: replace dev_err() with dev_err_probe()
Subsystems (2)
PATCH v2 1/1 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().
---
Changes in v2:
- Improve the commit message.
- Add 'Reviewed-by' tag of Marco Felsch.
drivers/pmdomain/imx/gpcv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pmdomain/imx/gpcv2.c +2 -2
@@ -1356,7 +1356,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ret =pm_genpd_init (&domain->genpd,NULL , true);if (ret) { -dev_err (domain->dev,"Failed to init power domain\n" ); +dev_err_probe (domain->dev, ret,"Failed to init power domain\n" ); goto out_domain_unmap; }
@@ -1367,7 +1367,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ret =of_genpd_add_provider_simple (domain->dev->of_node, &domain->genpd);if (ret) { -dev_err (domain->dev,"Failed to add genpd provider\n" ); +dev_err_probe (domain->dev, ret,"Failed to add genpd provider\n" ); goto out_genpd_remove; }
Signature · 1 line
2.43.0
Quoted 8 lines · Dario Binacchi
The patch standardizes the
probe()code by replacing the two occurrences ofdev_err()withdev_err_probe(). Indeed,dev_err_probe()was used in all other error paths of theprobe()function.
Note thatdev_err_probe()has advantages even if the error code is notEPROBE_DEFER, such as the symbolic output of the error code. Therefore, it should generally be preferred overdev_err().
Quoted 4 lines
Co-developed-by Michael Trimarchi <[email protected]>Signed-off-by Michael Trimarchi <[email protected]>Signed-off-by Dario Binacchi <[email protected]>Reviewed-by Marco Felsch <[email protected]>
Applied for next, thanks!
Kind regards
Uffe
Quoted 35 lines
---
Changes in v2:
- Improve the commit message.
- Add 'Reviewed-by' tag of Marco Felsch.drivers/pmdomain/imx/gpcv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/pmdomain/imx/gpcv2.c +2
-3@@ -1356,7 +1356,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ret =pm_genpd_init (&domain->genpd,NULL , true);if (ret) { -dev_err (domain->dev,"Failed to init power domain\n" ); +dev_err_probe (domain->dev, ret,"Failed to init power domain\n" ); goto out_domain_unmap; }@@ -1367,7 +1367,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ret =of_genpd_add_provider_simple (domain->dev->of_node, &domain->genpd);if (ret) { -dev_err (domain->dev,"Failed to add genpd provider\n" ); +dev_err_probe (domain->dev, ret,"Failed to add genpd provider\n" ); goto out_genpd_remove; } --2.43.0