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

Commit 0fff435e authored by Shankar Ravi's avatar Shankar Ravi Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Check for valid per frame i2c data.



Add check for valid i2c data per frame before
consuming in the flush request. This issue
reported in random stability

Change-Id: I43f90f1af714a2a4ae3efd86ec6e306c4fde802c
Signed-off-by: default avatarShankar Ravi <rshankar@codeaurora.org>
parent 38bf0c90
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1177,6 +1177,11 @@ int32_t cam_sensor_flush_request(struct cam_req_mgr_flush_request *flush_req)
		return -EINVAL;
	}

	if (s_ctrl->i2c_data.per_frame == NULL) {
		CAM_ERR(CAM_SENSOR, "i2c frame data is NULL");
		return -EINVAL;
	}

	for (i = 0; i < MAX_PER_FRAME_ARRAY; i++) {
		i2c_set = &(s_ctrl->i2c_data.per_frame[i]);