linux/drivers/media/platform
Ming Qian 0ee9469f81 media: imx-jpeg: Cleanup after an allocation error
commit 7500bb9cf1 upstream.

When allocation failures are not cleaned up by the driver, further
allocation errors will be false-positives, which will cause buffers to
remain uninitialized and cause NULL pointer dereferences.
Ensure proper cleanup of failed allocations to prevent these issues.

Fixes: 2db16c6ed7 ("media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder")
Cc: stable@vger.kernel.org
Signed-off-by: Ming Qian <ming.qian@oss.nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-06-27 11:11:18 +01:00
..
allegro-dvt media: platform: allgro-dvt: unregister v4l2_device on the error path 2025-04-10 14:39:12 +02:00
amlogic media: ge2d: Convert to platform remove callback returning void 2023-04-11 16:59:14 +02:00
amphion media: amphion: Fix pm_runtime_set_suspended() with runtime pm enabled 2024-12-09 10:40:59 +01:00
aspeed media: videobuf2: core: Rename min_buffers_needed field in vb2_queue 2023-12-13 17:31:27 +01:00
atmel media: atmel-isi: use 'time_left' variable with wait_for_completion_timeout() 2024-08-09 07:56:39 +02:00
broadcom media: bcm2835-unicam: Disable trigger mode operation 2025-02-21 14:01:23 +01:00
cadence media: cadence: csi2rx: configure DPHY before starting source stream 2024-04-22 11:41:04 +02:00
chips-media media: chips-media: wave5: Fix timeout while testing 10bit hevc fluster 2025-04-20 10:15:38 +02:00
imagination media: imagination: fix a potential memory leak in e5010_probe() 2025-06-27 11:11:17 +01:00
intel media: Convert from tasklet to BH workqueue 2024-06-21 08:57:09 +02:00
marvell media: mmp: Bring back registration of the device 2025-02-17 10:05:33 +01:00
mediatek media: mediatek: vcodec: Correct vsi_core framebuffer size 2025-06-27 11:11:17 +01:00
microchip media: microchip-isc: Drop v4l2_subdev_link_validate() for video devices 2024-08-26 16:36:11 +03:00
nuvoton media: nuvoton: Fix reference handling of ece_pdev 2025-04-20 10:15:37 +02:00
nvidia media: tegra-vde: use 'time_left' variable with wait_for_completion_interruptible_timeout() 2024-08-09 07:56:39 +02:00
nxp media: imx-jpeg: Cleanup after an allocation error 2025-06-27 11:11:18 +01:00
qcom media: venus: Fix probe error handling 2025-06-27 11:11:17 +01:00
raspberrypi media: raspberrypi: VIDEO_RASPBERRYPI_PISP_BE should depend on ARCH_BCM2835 2024-08-09 07:56:38 +02:00
renesas move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
rockchip media: rockchip: rga: fix rga offset lookup 2025-04-20 10:15:33 +02:00
samsung media: s5p-mfc: Corrected NV12M/NV21M plane-sizes 2025-04-20 10:15:15 +02:00
st media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe() 2025-05-29 11:02:28 +02:00
sunxi media: sun4i_csi: Don't use v4l2_subdev_link_validate() for video device 2024-08-26 16:36:14 +03:00
ti media: omap3isp: use sgtable-based scatterlist wrappers 2025-06-27 11:11:17 +01:00
verisilicon media: verisilicon: Free post processor buffers on error 2025-06-19 15:31:39 +02:00
via media: via: Use correct dependency for camera sensor drivers 2023-09-14 12:38:17 +02:00
xilinx media: platform: xilinx: use for_each_endpoint_of_node() 2024-08-09 07:56:39 +02:00
Kconfig media: raspberrypi: Add support for PiSP BE 2024-06-27 13:06:47 +02:00
m2m-deinterlace.c media: m2m-deinterlace: remove unused struct 'vb2_dc_conf' 2024-05-31 13:51:17 +02:00
Makefile media: raspberrypi: Add support for PiSP BE 2024-06-27 13:06:47 +02:00
video-mux.c media: v4l2-subdev: Rename .init_cfg() operation to .init_state() 2023-12-04 10:37:47 +01:00