The vpu maybe null pointer or unreasonable value when scp crash, need to validate that the vpu pointer and the vpu instance within this context is valid in case of leading to kernel reboot. Fixes: 27a274db6b4c ("[media] vcodec: mediatek: Add Mediatek VP8 Video Encoder Driver") Signed-off-by: Yunfei Dong <yunfei.dong@mediatek.com> Reported-by: Steve Cho <stevecho@google.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>