Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561652 > unrolled thread

[PATCH 4.4 23/48] i2c: print correct device invalid address

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-01-18 12:40 +0100
Last post2017-01-18 12:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 23/48] i2c: print correct device invalid address Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-01-18 12:40 +0100

#1561652 — [PATCH 4.4 23/48] i2c: print correct device invalid address

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-01-18 12:40 +0100
Subject[PATCH 4.4 23/48] i2c: print correct device invalid address
Message-ID<t0WKS-3x9-21@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: John Garry <john.garry@huawei.com>

commit 6f724fb3039522486fce2e32e4c0fbe238a6ab02 upstream.

In of_i2c_register_device(), when the check for
device address validity fails we print the info.addr,
which has not been assigned properly.

Fix this by printing the actual invalid address.

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: b4e2f6ac1281 ("i2c: apply DT flags when probing")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/i2c-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -1400,7 +1400,7 @@ static struct i2c_client *of_i2c_registe
 
 	if (i2c_check_addr_validity(addr, info.flags)) {
 		dev_err(&adap->dev, "of_i2c: invalid addr=%x on %s\n",
-			info.addr, node->full_name);
+			addr, node->full_name);
 		return ERR_PTR(-EINVAL);
 	}
 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web