kernel_optimize_test/drivers/media/test-drivers
Jiasheng Jiang 663e7a7287 media: vidtv: Check for null return of vzalloc
[ Upstream commit e6a21a14106d9718aa4f8e115b1e474888eeba44 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-04-08 14:40:09 +02:00
..
vicodec Linux 5.9-rc4 2020-09-07 16:13:06 +02:00
vidtv media: vidtv: Check for null return of vzalloc 2022-04-08 14:40:09 +02:00
vimc media: media/test-drivers: use vb2_video_unregister_device() 2020-08-28 15:05:40 +02:00
vivid media: vivid: fix assignment of dev->fbuf_out_flags 2021-05-14 09:50:22 +02: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