Skip to contentSkip to conversation

Patch "mfd: max77843: Fix max77843_chg_init() return on error" has been added to the 4.1-stable tree

PATCH [email protected] 1 participant 1 message Oct 23, 2015

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

    mfd: max77843: Fix max77843_chg_init() return on error

to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:

     mfd-max77843-fix-max77843_chg_init-return-on-error.patch

and it can be found in the queue-4.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 1b52e50f2a402a266f1ba2281f0a57e87637a047 Mon Sep 17 00:00:00 2001

From: Javier Martinez Canillas <[email protected]>
Date: Mon, 21 Sep 2015 14:26:54 +0200
Subject: mfd: max77843: Fix max77843_chg_init() return on error

From: Javier Martinez Canillas <[email protected]>

commit 1b52e50f2a402a266f1ba2281f0a57e87637a047 upstream.

If i2c_new_dummy() fails in max77843_chg_init(), an PTR_ERR(NULL) is returned which is 0. So the function was wrongly returning a success value instead of an error code.

Fixes c7f585fe46d8 ("mfd: max77843: Add max77843 MFD driver core driver")
---
 drivers/mfd/max77843.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/max77843.c +1 -1
@@ -79,7 +79,7 @@ static int max77843_chg_init(struct max7
 	if (!max77843->i2c_chg) {
 		dev_err(&max77843->i2c->dev,
 				"Cannot allocate I2C device for Charger\n");
-		return PTR_ERR(max77843->i2c_chg);
+		return -ENODEV;
 	}
 	i2c_set_clientdata(max77843->i2c_chg, max77843);
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.1/mfd-max77843-fix-max77843_chg_init-return-on-error.patch