Re: em28xx causes NULL pointer warning in videobuf2-core.c

Hans Verkuil <[email protected]> Fri, 31 Jul 2026 12:39:24 +0200
Newsgroups org.kernel.vger.linux-media
Message-ID <[email protected]>
On 30/07/2026 19:08, Lars Ljung wrote:
> Hi,
> 
> While trying to get an old Pinnacle PCTV USB 2 to work I got a warning 
> message in the log. See the attached file. This is on Ubuntu, kernel 
> version 7.0.0-28.
> 
> The problem seems to be the second call to vb2_queue_init() in 
> em28xx_vb2_setup(). This call should only be made if VBI is supported, 
> right?

Correct. My em28xx device supports VBI, so I never caught that corner case.

I tested it with the disable_vbi=1 module option and reproduced and fixed this
bug.

> 
> I modified em28xx_vb2_setup() to use em28xx_vbi_supported() to check if 
> VBI is supported. That did silence the warning message.
> 
> My hardware still does not work, so that must be caused by something else.

With this fix my em28xx worked fine capturing video. So it appears this was
the only place where the em28xx_vbi_supported() call was missing.

Regards,

	Hans

> 
> Kind regards,
> Lars Ljung