msm: vidc: Add check to avoid NULL ptr dereference

Check ubwc_config for not being NULL before
dereferencing.

Change-Id: Ia4c87ea4a0e963b33165b0ea9a9c39339cc65832
Signed-off-by: Dikshita Agarwal <dikshita@codeaurora.org>
This commit is contained in:
Dikshita Agarwal 2019-11-06 16:37:37 +05:30 • committed by Mihir Ganu
commit 923758b884

View file

@ -508,7 +508,8 @@ void *vidc_get_drv_data(struct device *dev)
driver_data->ubwc_config->highest_bank_bit = 0xf;
d_vpr_h("DDR Type 0x%x hbb 0x%x\n",
ddr_type, driver_data->ubwc_config->highest_bank_bit);
ddr_type, driver_data->ubwc_config ?
driver_data->ubwc_config->highest_bank_bit : -1);
}
exit:
return driver_data;