diff options
author | John Garry <john.garry@huawei.com> | 2017-01-06 19:02:57 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-01-12 20:06:15 +0100 |
commit | 6f724fb3039522486fce2e32e4c0fbe238a6ab02 (patch) | |
tree | b9ae15aff1dd84ac38f7b486e19c4ac69635bf80 | |
parent | 331c34255293cd02d395b7097008b509ba89e60e (diff) | |
download | linux-6f724fb3039522486fce2e32e4c0fbe238a6ab02.tar.gz linux-6f724fb3039522486fce2e32e4c0fbe238a6ab02.tar.bz2 linux-6f724fb3039522486fce2e32e4c0fbe238a6ab02.zip |
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 <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")
Cc: stable@kernel.org
-rw-r--r-- | drivers/i2c/i2c-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 7b117240f1ea..c26296c2eac5 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); } |