summaryrefslogtreecommitdiff
path: root/drivers/regulator/anatop-regulator.c
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@nxp.com>2017-02-02 15:35:48 +0200
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:25:32 +0800
commitb69c6442e6af309a27bcf150190929f4964622b0 (patch)
tree46cb31893a3c1a7adc26c65a1cbac7dfcdb8cfc0 /drivers/regulator/anatop-regulator.c
parent5b5e9ea8b658b97357b19ed1acf1c4480f16b77b (diff)
MLK-13793-2 regulator: anatop: Do not print error message for EPROBE_DEFER
An anatop regulator will return -EPROBE_DEFER when trying to register, if it has a supply from PMIC and this supply is not yet registered. This does not represent an error since the driver will call probe again later, so skip the error message in this case. Signed-off-by: Irina Tirdea <irina.tirdea@nxp.com>
Diffstat (limited to 'drivers/regulator/anatop-regulator.c')
-rw-r--r--drivers/regulator/anatop-regulator.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index fcdbc836ca4a..e4915970f05c 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -386,9 +386,10 @@ static int anatop_regulator_probe(struct platform_device *pdev)
/* register regulator */
rdev = devm_regulator_register(dev, rdesc, &config);
if (IS_ERR(rdev)) {
- dev_err(dev, "failed to register %s\n",
- rdesc->name);
- return PTR_ERR(rdev);
+ ret = PTR_ERR(rdev);
+ if (ret != -EPROBE_DEFER)
+ dev_err(dev, "failed to register %s\n", rdesc->name);
+ return ret;
}
platform_set_drvdata(pdev, rdev);