[PATCH] i3c: fix uninitialized variable use in i2c setup

Alexandre Belloni alexandre.belloni at bootlin.com
Tue Mar 8 07:11:35 PST 2022


On 08/03/2022 13:42:26+0000, Jamie Iles wrote:
> 97a82882d852 ("i3c: remove i2c board info from i2c_dev_desc") removed
> the boardinfo from i2c_dev_desc to decouple device enumeration from
> setup but did not correctly lookup the i2c_dev_desc to store the new
> device, instead dereferencing an uninitialized variable.
> 
> Lookup the device that has already been registered by address to store
> the i2c client device.
> 
> Fixes: 97a82882d852 ("i3c: remove i2c board info from i2c_dev_desc")
> Reported-by: kernel test robot <lkp at intel.com>
> Cc: Alexandre Belloni <alexandre.belloni at bootlin.com>
> Signed-off-by: Jamie Iles <quic_jiles at quicinc.com>
> ---
>  drivers/i3c/master.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
Applied, thanks.

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the linux-i3c mailing list