summaryrefslogtreecommitdiffstats
path: root/drivers/soc
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2020-10-03 12:58:31 -0700
committerOlof Johansson <olof@lixom.net>2020-10-03 12:58:32 -0700
commita39c258cc4763768b02e0166a67b90e3b9f43fc1 (patch)
tree3e68edb9c716c12bad4d815ee54117b7803df15a /drivers/soc
parent8fc6726d90209ff3167a86b7cfdc6970387c8342 (diff)
parente2314cf5af30d5e87cbf89fdef1a0fe4efee4552 (diff)
downloadlinux-a39c258cc4763768b02e0166a67b90e3b9f43fc1.tar.bz2
Merge tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into arm/drivers
i.MX drivers update for 5.10: - Use dev_err_probe() to simplify error handling for i.MX GPCv2 driver. - Add a check in i.MX SCU power domain driver to ignore the power domains that are not owned by the current partition. * tag 'imx-drivers-5.10' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: firmware: imx: scu-pd: ignore power domain not owned soc: imx: gpcv2: Use dev_err_probe() to simplify error handling Link: https://lore.kernel.org/r/20200923073009.23678-1-shawnguo@kernel.org Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'drivers/soc')
-rw-r--r--drivers/soc/imx/gpcv2.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 6cf8a7a412bd..db7e7fc321b1 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -487,22 +487,17 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
domain->regulator = devm_regulator_get_optional(domain->dev, "power");
if (IS_ERR(domain->regulator)) {
- if (PTR_ERR(domain->regulator) != -ENODEV) {
- if (PTR_ERR(domain->regulator) != -EPROBE_DEFER)
- dev_err(domain->dev, "Failed to get domain's regulator\n");
- return PTR_ERR(domain->regulator);
- }
+ if (PTR_ERR(domain->regulator) != -ENODEV)
+ return dev_err_probe(domain->dev, PTR_ERR(domain->regulator),
+ "Failed to get domain's regulator\n");
} else if (domain->voltage) {
regulator_set_voltage(domain->regulator,
domain->voltage, domain->voltage);
}
ret = imx_pgc_get_clocks(domain);
- if (ret) {
- if (ret != -EPROBE_DEFER)
- dev_err(domain->dev, "Failed to get domain's clocks\n");
- return ret;
- }
+ if (ret)
+ return dev_err_probe(domain->dev, ret, "Failed to get domain's clocks\n");
ret = pm_genpd_init(&domain->genpd, NULL, true);
if (ret) {