Skip to content

Commit

Permalink
max17042_battery: Fix missing verify_model_lock() return value check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Anton Vorontsov committed Nov 18, 2012
1 parent 8511748 commit a879f19
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/power/max17042_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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__);
Expand Down

0 comments on commit a879f19

Please sign in to comment.