summaryrefslogtreecommitdiff
path: root/drivers/media/platform/davinci/vpif_display.c
diff options
context:
space:
mode:
authorJiasheng Jiang <jiasheng@iscas.ac.cn>2022-01-14 07:28:40 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-03-07 11:06:19 +0100
commite6a21a14106d9718aa4f8e115b1e474888eeba44 (patch)
treec9d9fe68b0886e1a16cc5365e0ce690f458109d0 /drivers/media/platform/davinci/vpif_display.c
parent479f4a6e602a46c110affeeb866d2d03422418ee (diff)
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: f90cf6079bf6 ("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>
Diffstat (limited to 'drivers/media/platform/davinci/vpif_display.c')
0 files changed, 0 insertions, 0 deletions