linux-yocto/drivers/media/v4l2-core
Sakari Ailus 8a751ccf82 media: v4l2-ctrls: Don't reset handler's error in v4l2_ctrl_handler_free()
commit 5a0400aca5 upstream.

It's a common pattern in drivers to free the control handler's resources
and then return the handler's error code on drivers' error handling paths.
Alas, the v4l2_ctrl_handler_free() function also zeroes the error field,
effectively indicating successful return to the caller.

There's no apparent need to touch the error field while releasing the
control handler's resources and cleaning up stale pointers. Not touching
the handler's error field is a more certain way to address this problem
than changing all the users, in which case the pattern would be likely to
re-emerge in new drivers.

Do just that, don't touch the control handler's error field in
v4l2_ctrl_handler_free().

Fixes: 0996517cf8 ("V4L/DVB: v4l2: Add new control handling framework")
Cc: stable@vger.kernel.org
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Hans Verkuil <hverkuil@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-28 16:26:08 +02:00
..
Kconfig
Makefile
tuner-core.c
v4l2-async.c media: v4l: async: Fix NULL pointer dereference in adding ancillary links 2024-08-03 08:49:11 +02:00
v4l2-common.c media: v4l2-common: Reduce warnings about missing V4L2_CID_LINK_FREQ control 2025-08-28 16:26:00 +02:00
v4l2-compat-ioctl32.c
v4l2-ctrls-api.c media: v4l2-ctrls-api: fix error handling for v4l2_g_ctrl() 2024-11-14 13:15:14 +01:00
v4l2-ctrls-core.c media: v4l2-ctrls: Don't reset handler's error in v4l2_ctrl_handler_free() 2025-08-28 16:26:08 +02:00
v4l2-ctrls-defs.c
v4l2-ctrls-priv.h
v4l2-ctrls-request.c
v4l2-dev.c media: v4l2-dev: fix error handling in __video_register_device() 2025-06-27 11:07:27 +01:00
v4l2-device.c
v4l2-dv-timings.c media: v4l2-dv-timings: prevent possible overflow in v4l2_detect_gtf() 2025-04-25 10:43:37 +02:00
v4l2-event.c
v4l2-fh.c
v4l2-flash-led-class.c
v4l2-fwnode.c
v4l2-h264.c
v4l2-i2c.c
v4l2-ioctl.c
v4l2-jpeg.c
v4l2-mc.c media: mc: fix endpoint iteration 2025-02-21 13:49:48 +01:00
v4l2-mem2mem.c
v4l2-spi.c
v4l2-subdev.c
v4l2-trace.c
v4l2-vp9.c
videobuf-core.c
videobuf-dma-contig.c
videobuf-dma-sg.c
videobuf-vmalloc.c