If wave5_vpu_dec_open() is not called before calling
wave5_vpu_dec_clr_disp_flag(), there is null deference. Fix the
null deference by checking codec_info.
Change-Id: I1a4d9a75681df293e1f67dd4338c6f770d789223
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
int wave5_vpu_dec_clr_disp_flag(struct vpu_instance *inst, int index)
{
- struct dec_info *p_dec_info = &inst->codec_info->dec_info;
+ struct dec_info *p_dec_info;
int ret = 0;
struct vpu_device *vpu_dev = inst->dev;
+ if (!inst->codec_info)
+ return -EINVAL;
+
+ p_dec_info = &inst->codec_info->dec_info;
if (index >= p_dec_info->num_of_display_fbs)
return -EINVAL;