Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f724fb3 authored by John Garry's avatar John Garry Committed by Wolfram Sang
Browse files

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: default avatarJohn Garry <john.garry@huawei.com>
Reviewed-by: default avatarVladimir Zapolskiy <vz@mleia.com>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
Fixes: b4e2f6ac ("i2c: apply DT flags when probing")
Cc: stable@kernel.org
parent 331c3425
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}