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

Commit f4e179e6 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram
Browse files

msm: camera: sensor: Remove NULL check



This change removes the NULL check in update power settings
since this function is expected to be invoked only once at the
time of probe.

Change-Id: I976c976bea2df35adf5de1988930bfa3fe454561
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent 52e32061
Loading
Loading
Loading
Loading
+13 −17
Original line number Diff line number Diff line
@@ -698,17 +698,14 @@ int32_t cam_sensor_update_power_settings(void *cmd_buf,
	}

	power_info->power_setting_size = 0;
	if (power_info->power_setting == NULL) {
	power_info->power_setting =
		(struct cam_sensor_power_setting *)
		kzalloc(sizeof(struct cam_sensor_power_setting) *
			MAX_POWER_CONFIG, GFP_KERNEL);
	if (!power_info->power_setting)
		return -ENOMEM;
	}

	power_info->power_down_setting_size = 0;
	if (power_info->power_down_setting == NULL) {
	power_info->power_down_setting =
		(struct cam_sensor_power_setting *)
		kzalloc(sizeof(struct cam_sensor_power_setting) *
@@ -717,7 +714,6 @@ int32_t cam_sensor_update_power_settings(void *cmd_buf,
		rc = -ENOMEM;
		goto free_power_settings;
	}
	}

	while (tot_size < cmd_length) {
		if (cmm_hdr->cmd_type ==