aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/rt4831-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/rt4831-regulator.c')
-rw-r--r--drivers/regulator/rt4831-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/rt4831-regulator.c b/drivers/regulator/rt4831-regulator.c
index 3d4695ded629..e3aaac90d238 100644
--- a/drivers/regulator/rt4831-regulator.c
+++ b/drivers/regulator/rt4831-regulator.c
@@ -153,9 +153,9 @@ static int rt4831_regulator_probe(struct platform_device *pdev)
int i, ret;
regmap = dev_get_regmap(pdev->dev.parent, NULL);
- if (IS_ERR(regmap)) {
+ if (!regmap) {
dev_err(&pdev->dev, "Failed to init regmap\n");
- return PTR_ERR(regmap);
+ return -ENODEV;
}
/* Configure DSV mode to normal by default */