Skip to contentSkip to conversation

Patch "i2c: mux: reg: wrong condition checked for of_address_to_resource return value" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Aug 8, 2016

Subsystems (2)
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

i2c: mux: reg: wrong condition checked for of_address_to_resource return value

to the 4.4-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:
i2c-mux-reg-wrong-condition-checked-for-of_address_to_resource-return-value.patch
and it can be found in the queue-4.4 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 22ebf00eb56fe77922de8138aa9af9996582c2b3 Mon Sep 17 00:00:00 2001

From: Lukasz Gemborowski <[email protected]>
Date: Mon, 27 Jun 2016 12:57:47 +0200
Subject: i2c: mux: reg: wrong condition checked for of_address_to_resource return value

From: Lukasz Gemborowski <[email protected]>

commit 22ebf00eb56fe77922de8138aa9af9996582c2b3 upstream.

of_address_to_resource return 0 on successful call but devm_ioremap_resource is called only if it returns non-zero value

---
 drivers/i2c/muxes/i2c-mux-reg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/muxes/i2c-mux-reg.c +1 -1
@@ -150,7 +150,7 @@ static int i2c_mux_reg_probe_dt(struct r
 		mux->data.idle_in_use = true;
 
 	/* map address from "reg" if exists */
-	if (of_address_to_resource(np, 0, &res)) {
+	if (of_address_to_resource(np, 0, &res) == 0) {
 		mux->data.reg_size = resource_size(&res);
 		mux->data.reg = devm_ioremap_resource(&pdev->dev, &res);
 		if (IS_ERR(mux->data.reg))

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

queue-4.4/i2c-mux-reg-wrong-condition-checked-for-of_address_to_resource-return-value.patch