diff options
-rw-r--r-- | drivers/regulator/anatop-regulator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c index 30e8d7ad5813..542d14ed48bb 100644 --- a/drivers/regulator/anatop-regulator.c +++ b/drivers/regulator/anatop-regulator.c | |||
@@ -291,6 +291,11 @@ static int anatop_regulator_probe(struct platform_device *pdev) | |||
291 | */ | 291 | */ |
292 | if (!sreg->sel && !strcmp(sreg->name, "vddpu")) | 292 | if (!sreg->sel && !strcmp(sreg->name, "vddpu")) |
293 | sreg->sel = 22; | 293 | sreg->sel = 22; |
294 | |||
295 | if (!sreg->sel) { | ||
296 | dev_err(&pdev->dev, "Failed to read a valid default voltage selector.\n"); | ||
297 | return -EINVAL; | ||
298 | } | ||
294 | } else { | 299 | } else { |
295 | rdesc->ops = &anatop_rops; | 300 | rdesc->ops = &anatop_rops; |
296 | } | 301 | } |