Commit 508b2c13 authored by Sachin Kamat's avatar Sachin Kamat Committed by Anton Vorontsov

pm2301-charger: Check return value of regulator_enable

Check the return value of regulator_enable to silence the following
warning:
drivers/power/pm2301_charger.c:725:20: warning:
ignoring return value of ‘regulator_enable’, declared with
attribute warn_unused_result [-Wunused-result]
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarAnton Vorontsov <anton@enomsg.org>
parent 08a5c7e6
......@@ -722,8 +722,12 @@ static int pm2xxx_charger_ac_en(struct ux500_charger *charger,
dev_dbg(pm2->dev, "Enable AC: %dmV %dmA\n", vset, iset);
if (!pm2->vddadc_en_ac) {
regulator_enable(pm2->regu);
pm2->vddadc_en_ac = true;
ret = regulator_enable(pm2->regu);
if (ret)
dev_warn(pm2->dev,
"Failed to enable vddadc regulator\n");
else
pm2->vddadc_en_ac = true;
}
ret = pm2xxx_charging_init(pm2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment