diff options
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/wm831x-ldo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c index 5cb70ca1e98..56a6de3dd88 100644 --- a/drivers/regulator/wm831x-ldo.c +++ b/drivers/regulator/wm831x-ldo.c @@ -205,6 +205,8 @@ static int wm831x_gp_ldo_get_status(struct regulator_dev *rdev) /* Is it reporting under voltage? */ ret = wm831x_reg_read(wm831x, WM831X_LDO_UV_STATUS); + if (ret < 0) + return ret; if (ret & mask) return REGULATOR_STATUS_ERROR; @@ -469,6 +471,8 @@ static int wm831x_aldo_get_status(struct regulator_dev *rdev) /* Is it reporting under voltage? */ ret = wm831x_reg_read(wm831x, WM831X_LDO_UV_STATUS); + if (ret < 0) + return ret; if (ret & mask) return REGULATOR_STATUS_ERROR; |