瀏覽代碼

msm: camera: isp: Add null check for vfe out res data

Fixes the null pointer dereference in the get Constraint error
function.

CRs-Fixed: 2825045
Change-Id: I72d8e51257fcfeca8386e626cf04db448bf3b483
Signed-off-by: Ayush Kumar <[email protected]>
Ayush Kumar 4 年之前
父節點
當前提交
a73a482f76
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

+ 5 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -862,6 +862,11 @@ static void cam_vfe_bus_ver3_get_constraint_errors(
 
 	for (i = 0; i < bus_priv->num_out; i++) {
 		out_rsrc_node = &bus_priv->vfe_out[i];
+		if (!out_rsrc_node || !out_rsrc_node->res_priv) {
+			CAM_DBG(CAM_ISP,
+				"Vfe out:%d out rsrc node or data is NULL", i);
+			continue;
+		}
 		out_rsrc_data = out_rsrc_node->res_priv;
 		for (j = 0; j < out_rsrc_data->num_wm; j++) {
 			wm_data = out_rsrc_data->wm_res[j].res_priv;