linux-stable/drivers/media/test-drivers
Jiasheng Jiang e6a21a1410 media: vidtv: Check for null return of vzalloc
As the possible failure of the vzalloc(), e->encoder_buf might be NULL.
Therefore, it should be better to check it in order
to guarantee the success of the initialization.
If fails, we need to free not only 'e' but also 'e->name'.
Also, if the allocation for ctx fails, we need to free 'e->encoder_buf'
else.

Fixes: f90cf6079b ("media: vidtv: add a bridge driver")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-07 11:06:19 +01:00
..
vicodec media: replace setting of bytesused with vb2_set_plane_payload 2021-12-07 11:29:56 +01:00
vidtv media: vidtv: Check for null return of vzalloc 2022-03-07 11:06:19 +01:00
vimc media: vimc: Add support for contiguous DMA buffers 2022-02-16 12:47:02 +01:00
vivid media: vivid: fix timestamp and sequence wrapping 2022-01-23 21:18:42 +01:00
Kconfig media: media/test-drivers/Kconfig: fix broken Kconfig 2020-09-12 10:21:01 +02:00
Makefile media: vidtv: implement a tuner driver 2020-09-12 09:42:16 +02:00
vim2m.c media: vim2m: Remove repeated verbose license text 2021-09-30 10:07:55 +02:00