diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2012-11-18 17:59:47 -0500 |
---|---|---|
committer | Anton Vorontsov <anton.vorontsov@linaro.org> | 2012-11-18 17:59:47 -0500 |
commit | a879f19fe7decb9a53d13a63edd2eced8c2895a2 (patch) | |
tree | cdd8722a6cd84aa7d27d79aded0da18552c97865 /drivers | |
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')
-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 74abc6c755b4..66b2c7b50914 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) | |||
572 | __func__); | 572 | __func__); |
573 | return -EIO; | 573 | return -EIO; |
574 | } | 574 | } |
575 | max17042_verify_model_lock(chip); | 575 | |
576 | ret = max17042_verify_model_lock(chip); | ||
576 | if (ret) { | 577 | if (ret) { |
577 | dev_err(&chip->client->dev, "%s lock verify failed\n", | 578 | dev_err(&chip->client->dev, "%s lock verify failed\n", |
578 | __func__); | 579 | __func__); |