fix up the warning:
drivers/regulator/lp8752.c: In function 'lp8752_buck_set_mode':
drivers/regulator/lp8752.c:93:2: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized]
Change-Id: Iee9f69791bbcea2e6b3a16713b76e93cfc0a2b67
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
ret = regmap_update_bits(pchip->regmap,
rdev->desc->enable_reg,
msk, 0x1);
+ break;
case REGULATOR_MODE_NORMAL:
/* automatic pwm/pfm mode */
ret = regmap_update_bits(pchip->regmap,
rdev->desc->enable_reg,
msk, 0x0);
+ break;
default:
+ dev_err(pchip->dev, "error:lp8752 only support auto and pwm mode\n");
+ ret = -EINVAL;
break;
}