On Sun Sep 13 18:33:13 2026 -0400, Myeonghun Pak wrote:
> USB probe failures after I2C adapter registration free the backing
> go7007 structure without unregistering the adapter.
>
> If i2c_adapter_online is set, unregister the adapter before releasing
> USB resources so that I2C client removal can still use its callbacks.
>
> This issue was identified during our ongoing static-analysis research
> while reviewing kernel code.
>
> Fixes: 59aea928d57f ("[media] go7007: don't continue if firmware can't be
> loaded")
> Cc: [email protected]
> Co-developed-by: Ijae Kim <[email protected]>
> Signed-off-by: Ijae Kim <[email protected]>
> Signed-off-by: Myeonghun Pak <[email protected]>
> Assisted-by: OpenAI:GPT-5.6
> Signed-off-by: Hans Verkuil <[email protected]>
Patch committed.
Thanks,
Hans Verkuil
drivers/media/usb/go7007/go7007-usb.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/drivers/media/usb/go7007/go7007-usb.c
b/drivers/media/usb/go7007/go7007-usb.c
index 867548d655b3..dc5b8750a110 100644
--- a/drivers/media/usb/go7007/go7007-usb.c
+++ b/drivers/media/usb/go7007/go7007-usb.c
@@ -1326,6 +1326,8 @@ static int go7007_usb_probe(struct usb_interface *intf,
return 0;
allocfail:
+ if (go->i2c_adapter_online)
+ i2c_del_adapter(&go->i2c_adapter);
go7007_usb_release(go);
kfree(go);
return -ENOMEM;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]