From a879f19fe7decb9a53d13a63edd2eced8c2895a2 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 18 Nov 2012 14:59:47 -0800 Subject: [PATCH] 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 Acked-by: Ramakrishna Pallala Signed-off-by: Anton Vorontsov --- drivers/power/max17042_battery.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) __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__); -- 2.30.2