media: gspca: Add error handling for stv06xx_read_sensor()
authorWentao Liang <vulab@iscas.ac.cn>
Tue, 22 Apr 2025 03:07:39 +0000 (11:07 +0800)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 25 Apr 2025 13:14:37 +0000 (15:14 +0200)
commit398a1b33f1479af35ca915c5efc9b00d6204f8fa
treecc22990b126567311690cfdf5fcb3cffa4a6c248
parentbd9f6ce7d512fa21249415c16af801a4ed5d97b6
media: gspca: Add error handling for stv06xx_read_sensor()

In hdcs_init(), the return value of stv06xx_read_sensor() needs to be
checked. A proper implementation can be found in vv6410_dump(). Add a
check in loop condition and propergate error code to fix this issue.

Fixes: 4c98834addfe ("V4L/DVB (10048): gspca - stv06xx: New subdriver.")
Cc: stable@vger.kernel.org # v2.6+
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/usb/gspca/stv06xx/stv06xx_hdcs.c