Skip to content

Commit 6f724fb

Browse files
John GarryWolfram Sang
authored andcommitted
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 <[email protected]> Reviewed-by: Vladimir Zapolskiy <[email protected]> Signed-off-by: Wolfram Sang <[email protected]> Fixes: b4e2f6a ("i2c: apply DT flags when probing") Cc: [email protected]
1 parent 331c342 commit 6f724fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/i2c/i2c-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,7 @@ static struct i2c_client *of_i2c_register_device(struct i2c_adapter *adap,
17041704

17051705
if (i2c_check_addr_validity(addr, info.flags)) {
17061706
dev_err(&adap->dev, "of_i2c: invalid addr=%x on %s\n",
1707-
info.addr, node->full_name);
1707+
addr, node->full_name);
17081708
return ERR_PTR(-EINVAL);
17091709
}
17101710

0 commit comments

Comments
 (0)