summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2012-11-18 14:59:47 -0800
committerAnton Vorontsov <anton.vorontsov@linaro.org>2012-11-18 14:59:47 -0800
commita879f19fe7decb9a53d13a63edd2eced8c2895a2 (patch)
treecdd8722a6cd84aa7d27d79aded0da18552c97865 /drivers/power
parent8511748ba1ab83a7d89d802a50335115358a8cfc (diff)
max17042_battery: Fix missing verify_model_lock() return value check
The second error check is unreachable because the lock function isn't assigned to ret. Signed-off-by: Alan Cox <alan@linux.intel.com> Acked-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/max17042_battery.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
index 74abc6c755b..66b2c7b5091 100644
--- a/drivers/power/max17042_battery.c
+++ b/drivers/power/max17042_battery.c
@@ -572,7 +572,8 @@ static int max17042_init_chip(struct max17042_chip *chip)
__func__);
return -EIO;
}
- max17042_verify_model_lock(chip);
+
+ ret = max17042_verify_model_lock(chip);
if (ret) {
dev_err(&chip->client->dev, "%s lock verify failed\n",
__func__);