Commit a879f19f authored by Alan Cox's avatar Alan Cox Committed by Anton Vorontsov

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: default avatarAlan Cox <alan@linux.intel.com>
Acked-by: default avatarRamakrishna Pallala <ramakrishna.pallala@intel.com>
Signed-off-by: default avatarAnton Vorontsov <anton.vorontsov@linaro.org>
parent 8511748b
......@@ -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__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment