Skip to contentSkip to conversation

max17042: missing assignment

PATCH RESEND In review Alan Cox 3 participants 3 messages Oct 25, 2012 – Nov 18, 2012

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH RESEND 1/1 max17042: missing assignment

From: Alan Cox <[email protected]>

The second error check is unreachable because the lock function isn't assigned to ret

---

 drivers/power/max17042_battery.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/max17042_battery.c +1 -1
index 74abc6c..73b432d 100644
@@ -572,7 +572,7 @@ 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__);
Acked-by on v1 1/1
#1 lore raw

Thanks Alan.

Quoted 4 lines

The second error check is unreachable because the lock function isn't assigned to ret

Quoted 19 lines

---

 drivers/power/max17042_battery.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/max17042_battery.c +1 -1
index 74abc6c..73b432d 100644
@@ -572,7 +572,7 @@ 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",
Quoted 1 line

__func__);

���{.n�+�������+%�����ݶ��w��{.n�+����{��G�����{ay�ʇڙ�,j��f���h��������z_�(�階�ݢj"���m������G������?����&���~��iO��z��v�^�m���� ������?�I�

#2 lore raw
Quoted 8 lines · Ramakrishna

Thanks Alan.

Quoted 4 lines

The second error check is unreachable because the lock function isn't assigned to ret

For some reason I don't have the original patch in my mailbox. I wonder if I have not been Cc'ed on this one or it got lost...

Anyway, I reconstructed it by hand and applied, thanks a lot!

Anton.

Quoted 21 lines
Quoted 20 lines

---

 drivers/power/max17042_battery.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/max17042_battery.c +1 -1
index 74abc6c..73b432d 100644
@@ -572,7 +572,7 @@ 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__);