diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2012-11-18 14:59:47 -0800 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-11-18 14:59:47 -0800 |
commit | a879f19fe7decb9a53d13a63edd2eced8c2895a2 (patch) | |
tree | cdd8722a6cd84aa7d27d79aded0da18552c97865 /drivers/power | |
parent | 8511748ba1ab83a7d89d802a50335115358a8cfc (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.c | 3 |
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__); |