Patchwork [3.5.y.z,extended,stable] Patch "i2c-mux-pinctrl: Fix probe error path" has been added to staging queue

mail settings
Submitter Herton Ronaldo Krzesinski
Date Dec. 7, 2012, 4:05 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/204556/
State New
Headers show


Herton Ronaldo Krzesinski - Dec. 7, 2012, 4:05 p.m.
This is a note to let you know that I have just added a patch titled

    i2c-mux-pinctrl: Fix probe error path

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From df60e7370ea4c17e3306e2c5655c13741edf3bb1 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <>
Date: Tue, 13 Nov 2012 22:27:19 +0100
Subject: [PATCH] i2c-mux-pinctrl: Fix probe error path

commit aa1e3e81e75ceb3d977c3292cefafcd5179eb8b8 upstream.

When allocating the memory for i2c busses, the code checked the wrong
variable and thus never detected if there was a memory error.

Signed-off-by: Guenter Roeck <>
Signed-off-by: Jean Delvare <>
Signed-off-by: Herton Ronaldo Krzesinski <>
 drivers/i2c/muxes/i2c-mux-pinctrl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/drivers/i2c/muxes/i2c-mux-pinctrl.c b/drivers/i2c/muxes/i2c-mux-pinctrl.c
index 46a6697..c524018 100644
--- a/drivers/i2c/muxes/i2c-mux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-mux-pinctrl.c
@@ -169,7 +169,7 @@  static int __devinit i2c_mux_pinctrl_probe(struct platform_device *pdev)
 	mux->busses = devm_kzalloc(&pdev->dev,
 				   sizeof(mux->busses) * mux->pdata->bus_count,
-	if (!mux->states) {
+	if (!mux->busses) {
 		dev_err(&pdev->dev, "Cannot allocate busses\n");
 		ret = -ENOMEM;
 		goto err;