Re: [PATCH 04/12] i2c: ocores: convert to use i2c_new_client_device()
From: Andrew Lunn
Date: Tue Jan 07 2020 - 14:37:27 EST
On Tue, Jan 07, 2020 at 07:32:50PM +0100, Peter Korsgaard wrote:
> >>>>> "Wolfram" == Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx> writes:
> > Move away from the deprecated API and return the shiny new ERRPTR where
> > useful.
> > Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
> I didn't follow the discussion, but I don't see any returns anywhere?
I have also not been following the discussion. But i2c_new_device()
seems to of always returned a NULL pointer on error, and the code has
been ignoring it. The 'where useful' comment suggests the return value
maybe checked, but it is optional to check it. So this patch seems
I suppose the commit message could be extended with:
In this case, the shiny new stuff is not useful, so ignore it.
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>