From: John Garry Date: Fri, 6 Jan 2017 11:02:57 +0000 (+0800) Subject: i2c: print correct device invalid address X-Git-Tag: v4.10-rc4~6^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f724fb3039522486fce2e32e4c0fbe238a6ab02;p=platform%2Fkernel%2Flinux-exynos.git i2c: print correct device invalid address 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 Reviewed-by: Vladimir Zapolskiy Signed-off-by: Wolfram Sang Fixes: b4e2f6ac1281 ("i2c: apply DT flags when probing") Cc: stable@kernel.org --- diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 7b11724..c26296c 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -1704,7 +1704,7 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap, 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); }