2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-10 14:43:54 +08:00
linux-next/drivers/media
Dan Carpenter cf10b0bb50 media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init()
If we encounter any error in the vdec_msg_queue_init() then we need
to set "msg_queue->wdma_addr.size = 0;".  Normally, this is done
inside the vdec_msg_queue_deinit() function.  However, if the
first call to allocate &msg_queue->wdma_addr fails, then the
vdec_msg_queue_deinit() function is a no-op.  For that situation, just
set the size to zero explicitly and return.

There were two other error paths which did not clean up before returning.
Change those error paths to goto mem_alloc_err.

Fixes: b199fe46f3 ("media: mtk-vcodec: Add msg queue feature for lat and core architecture")
Fixes: 2f5d0aef37 ("media: mediatek: vcodec: support stateless AV1 decoder")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2023-07-25 10:35:00 +02:00
..
cec media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
common drivers/media/common/siano/smsendian.c : eliminate unnecessary type conversions 2023-07-19 12:57:46 +02:00
dvb-core media updates for v6.5-rc1 2023-07-05 10:42:32 -07:00
dvb-frontends media: drxk: Use %*ph for printing hexdump of a small buffer 2023-07-25 09:24:30 +02:00
firewire media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00
i2c media: i2c: ds90ub913: Fix a warning about use of uninitialized variable 2023-07-25 09:24:30 +02:00
mc media: mc: Make media_get_pad_index() use pad type flag 2023-05-25 16:21:22 +02:00
mmc media: media/*/Kconfig: sort entries 2022-03-18 05:58:35 +01:00
pci media: pci: saa7164: replace BUG with error return 2023-07-25 09:24:31 +02:00
platform media: mediatek: vcodec: fix resource leaks in vdec_msg_queue_init() 2023-07-25 10:35:00 +02:00
radio media: wl128x: Fix spelling mistake "Transfered" -> "Transferred" 2023-07-19 12:57:48 +02:00
rc media: Explicitly include correct DT includes 2023-07-19 12:57:51 +02:00
spi media updates for v5.18-rc1 2022-03-23 14:51:35 -07:00
test-drivers media: Remove flag FBINFO_FLAG_DEFAULT from fbdev drivers 2023-07-25 09:24:30 +02:00
tuners media: tuners: qt1010: replace BUG_ON with a regular error 2023-07-25 09:24:30 +02:00
usb media: dvb-usb-v2: gl861: Fix null-ptr-deref in gl861_i2c_master_xfer 2023-07-19 12:57:50 +02:00
v4l2-core media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link() 2023-07-14 13:20:31 +02:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00