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

Commit 8b63da78 authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: Add NULL check before accessing power settings" into dev/msm-4.9-camx

parents 59d9684b 860716c8
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1303,6 +1303,11 @@ int cam_sensor_core_power_up(struct cam_sensor_power_ctrl_t *ctrl,
	for (index = 0; index < ctrl->power_setting_size; index++) {
		CAM_DBG(CAM_SENSOR, "index: %d", index);
		power_setting = &ctrl->power_setting[index];
		if (!power_setting) {
			CAM_ERR(CAM_SENSOR, "Invalid power up settings");
			return -EINVAL;
		}

		CAM_DBG(CAM_SENSOR, "seq_type %d", power_setting->seq_type);

		switch (power_setting->seq_type) {
@@ -1589,6 +1594,11 @@ static int cam_config_mclk_reg(struct cam_sensor_power_ctrl_t *ctrl,

	pd = &ctrl->power_down_setting[index];

	if (!pd) {
		CAM_ERR(CAM_SENSOR, "Invalid power down setting");
		return -EINVAL;
	}

	for (j = 0; j < num_vreg; j++) {
		if (!strcmp(soc_info->rgltr_name[j], "cam_clk")) {