lkml.org 
[lkml]   [2017]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] i2c: print correct device invalid address
From
Date
On 01/06/2017 01:02 PM, John Garry wrote:
> 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>
>
> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
> index cf9e396..03cfcdd 100644
> --- a/drivers/i2c/i2c-core.c
> +++ b/drivers/i2c/i2c-core.c
> @@ -1708,7 +1708,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);
> }
>
>

Reviewed-by: Vladimir Zapolskiy <vz@mleia.com>
Fixes: b4e2f6ac1281 ("i2c: apply DT flags when probing")

Thank you for the fix.

--
With best wishes,
Vladimir

\
 
 \ /
  Last update: 2017-01-07 22:44    [W:0.041 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site