mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
iio: adc: twl4030: Return an error if we can not enable the vusb3v1 regulator in 'twl4030_madc_probe()'
If we can not enable the regulator, go through the error handling path
instead of silently continuing.
Fixes: 7cc97d77ee ("iio: adc: twl4030: Fix ADC[3:6] readings")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
7f70be6e40
commit
53063846af
1 changed files with 3 additions and 1 deletions
|
|
@ -893,8 +893,10 @@ static int twl4030_madc_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
ret = regulator_enable(madc->usb3v1);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dev_err(madc->dev, "could not enable 3v1 bias regulator\n");
|
||||
goto err_i2c;
|
||||
}
|
||||
|
||||
ret = iio_device_register(iio_dev);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue