Re: [PATCH v3 03/10] i2c: core: fix NULL-deref on adapter registration failure

From: Wolfram Sang

Date: Wed Jun 03 2026 - 05:27:44 EST


On Mon, May 11, 2026 at 04:37:08PM +0200, Johan Hovold wrote:
> If adapter registration ever fails the release callback would trigger a
> NULL-pointer dereference as the completion struct has not been
> initialised.
>
> Note that before the offending commit this would instead have resulted
> in a minor memory leak of the adapter name.
>
> Fixes: 3f8c4f5e9a57 ("i2c: core: fix reference leak in i2c_register_adapter()")
> Cc: stable@xxxxxxxxxxxxxxx
> Cc: Joe Hattori <joe@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>

Reviewed-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>

Attachment: signature.asc
Description: PGP signature