提交 6f724fb3 编写于 作者: J John Garry 提交者: Wolfram Sang

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: NJohn Garry <john.garry@huawei.com>
Reviewed-by: NVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: NWolfram Sang <wsa@the-dreams.de>
Fixes: b4e2f6ac ("i2c: apply DT flags when probing")
Cc: stable@kernel.org
上级 331c3425
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册