linux/drivers/media/platform
Ming Qian b89ff9cf37 media: imx-jpeg: Cleanup after an allocation error
[ Upstream commit 7500bb9cf1 ]

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: Sasha Levin <sashal@kernel.org>
History 2025-07-06 10:57:57 +02:00
..
allegro-dvt media: platform: allgro-dvt: unregister v4l2_device on the error path 2025-04-10 14:33:31 +02:00
amlogic media: platform: fix some double free in meson-ge2d and mtk-jpeg and s5p-mfc 2022-08-30 15:20:49 +02:00
amphion media: amphion: Fix pm_runtime_set_suspended() with runtime pm enabled 2024-12-14 19:54:12 +01:00
aspeed media: aspeed: Fix memory overwrite if timing is 1600x900 2024-12-14 19:53:55 +01:00
atmel media: Replace dependency on VIDEO_V4L2_SUBDEV_API with select 2022-07-15 15:19:48 +01:00
cadence media: cadence: csi2rx: Unregister v4l2 async notifier 2023-11-20 11:52:14 +01:00
chips-media media: coda: Add check for kmalloc 2022-12-31 13:32:25 +01:00
intel media: avoid use of 'videobuf' 2022-08-29 16:27:18 +02:00
marvell media: marvell: Add check for clk_enable() 2025-02-21 13:49:18 +01:00
mediatek media: mediatek: vcodec: mark vdec_vp9_slice_map_counts_eob_coef noinline 2025-04-25 10:44:00 +02:00
nvidia media: tegra-vde: Use vb2_find_buffer 2022-07-17 11:12:21 +01:00
nxp media: imx-jpeg: Cleanup after an allocation error 2025-07-06 10:57:57 +02:00
qcom media: venus: Fix probe error handling 2025-06-27 11:07:27 +01:00
renesas media: renesas: vsp1: Store RPF partition configuration per RPF instance 2024-08-03 08:49:13 +02:00
rockchip media: rkisp1: Fix IRQ handling due to shared interrupts 2024-03-26 18:20:24 -04:00
samsung media: Switch to use dev_err_probe() helper 2025-03-07 16:56:32 +01:00
st media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe() 2025-06-04 14:40:08 +02:00
sunxi media: sun4i_csi: Implement link validate for sun4i_csi subdev 2024-10-17 15:21:58 +02:00
ti media: omap3isp: use sgtable-based scatterlist wrappers 2025-06-27 11:07:27 +01:00
verisilicon media: verisilicon: HEVC: Initialize start_bit field 2025-04-10 14:33:31 +02:00
via media: via: Use correct dependency for camera sensor drivers 2023-10-06 14:56:32 +02:00
xilinx media: Switch to use dev_err_probe() helper 2025-03-07 16:56:32 +01:00
Kconfig media: destage Hantro VPU driver 2022-08-31 10:23:50 +02:00
m2m-deinterlace.c media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO 2020-02-24 16:54:14 +01:00
Makefile media: destage Hantro VPU driver 2022-08-31 10:23:50 +02:00
video-mux.c media: mc-entity: Rename media_entity_remote_pad() to media_pad_remote_pad_first() 2022-07-17 11:21:35 +01:00