diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2013-09-06 04:01:11 -0400 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-10-25 18:36:40 -0400 |
commit | 508b2c13499aa459ff34123ec5641a72ca46777c (patch) | |
tree | 9be1e5285ba0f704ae39f0b5830bfdc39c04bee3 /drivers/power | |
parent | 08a5c7e6842f9c4c1556f147af2a561056345a45 (diff) |
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: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/pm2301_charger.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/power/pm2301_charger.c b/drivers/power/pm2301_charger.c index ffa10ed83eb1..7214b667f940 100644 --- a/drivers/power/pm2301_charger.c +++ b/drivers/power/pm2301_charger.c | |||
@@ -722,8 +722,12 @@ static int pm2xxx_charger_ac_en(struct ux500_charger *charger, | |||
722 | 722 | ||
723 | dev_dbg(pm2->dev, "Enable AC: %dmV %dmA\n", vset, iset); | 723 | dev_dbg(pm2->dev, "Enable AC: %dmV %dmA\n", vset, iset); |
724 | if (!pm2->vddadc_en_ac) { | 724 | if (!pm2->vddadc_en_ac) { |
725 | regulator_enable(pm2->regu); | 725 | ret = regulator_enable(pm2->regu); |
726 | pm2->vddadc_en_ac = true; | 726 | if (ret) |
727 | dev_warn(pm2->dev, | ||
728 | "Failed to enable vddadc regulator\n"); | ||
729 | else | ||
730 | pm2->vddadc_en_ac = true; | ||
727 | } | 731 | } |
728 | 732 | ||
729 | ret = pm2xxx_charging_init(pm2); | 733 | ret = pm2xxx_charging_init(pm2); |