On Tue Apr 14 16:32:39 2026 +0800, Haoxiang Li wrote:
> res_get() is called before em28xx_init_usb_xfer(), but the error
> path of em28xx_init_usb_xfer() does not release the resource,
> leading to a persistent busy state.
> 
> Signed-off-by: Haoxiang Li <[email protected]>
> Signed-off-by: Hans Verkuil <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

 drivers/media/usb/em28xx/em28xx-video.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

---

diff --git a/drivers/media/usb/em28xx/em28xx-video.c 
b/drivers/media/usb/em28xx/em28xx-video.c
index 4a0ce9c5ee4b..da0422c65e5f 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1248,8 +1248,10 @@ int em28xx_start_analog_streaming(struct vb2_queue *vq, 
unsigned int count)
                                          dev->max_pkt_size,
                                          dev->packet_multiplier,
                                          em28xx_urb_data_copy);
-               if (rc < 0)
+               if (rc < 0) {
+                       res_free(dev, vq->type);
                        return rc;
+               }
 
                /*
                 * djh: it's not clear whether this code is still needed.  I'm
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to