Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a73a482f authored by Ayush Kumar's avatar Ayush Kumar Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarAyush Kumar <ayushkr@codeaurora.org>
parent ce18cf39
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;