media: vicodec: Handle the case that the reference buffer is NULL
authorDafna Hirschfeld <dafna3@gmail.com>
Wed, 6 Mar 2019 21:13:35 +0000 (16:13 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 25 Mar 2019 17:50:44 +0000 (13:50 -0400)
commit747993722d20ff6586c1c2237f3fd779036f1c56
treeeb1c0b1da8c6694aa9fd1e11028737573265c133
parent50e4c5e1b6e4ff583a0335d97a6386a00da56446
media: vicodec: Handle the case that the reference buffer is NULL

In the stateless decoder the reference buffer is null if the
frame is an I-frame (flagged with FWHT_FL_I_FRAME).
Make sure not to dereference it in that case.

Signed-off-by: Dafna Hirschfeld <dafna3@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/vicodec/codec-fwht.c
drivers/media/platform/vicodec/codec-v4l2-fwht.c