On Fri Jul 31 12:36:52 2026 +0200, Hans Verkuil wrote:
> If the device does not support vbi, then the vbi queue is still
> initialized with vb2_queue_init(), which fails with a WARNing because
> the q->lock pointer is never set.
> 
> Only call vb2_queue_init for the vbi queue if vbi is actually
> supported.
> 
> Signed-off-by: Hans Verkuil <[email protected]>
> Tested-by: Hans Verkuil <[email protected]>
> Reported-by: Lars Ljung <[email protected]>
> Closes: 
> https://lore.kernel.org/linux-media/[email protected]/T/#u
> Reviewed-by: Sakari Ailus <[email protected]>

Patch committed.

Thanks,
Hans Verkuil

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

---

diff --git a/drivers/media/usb/em28xx/em28xx-video.c 
b/drivers/media/usb/em28xx/em28xx-video.c
index 864bab86ef69..c8eeb20afc38 100644
--- a/drivers/media/usb/em28xx/em28xx-video.c
+++ b/drivers/media/usb/em28xx/em28xx-video.c
@@ -1411,6 +1411,9 @@ static int em28xx_vb2_setup(struct em28xx *dev)
        if (rc < 0)
                return rc;
 
+       if (!em28xx_vbi_supported(dev))
+               return 0;
+
        /* Setup Videobuf2 for VBI capture */
        q = &v4l2->vb_vbiq;
        q->type = V4L2_BUF_TYPE_VBI_CAPTURE;
_______________________________________________
linuxtv-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to