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

Commit 5eab0836 authored by Jigarkumar Zala's avatar Jigarkumar Zala Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Error handling for optional clock



Add error check for the optional clock in order to restrict
further operation related to that clock. Also, Change/update log
level and log place to identify/avoid misread of log.

Change-Id: Ia0e1c7b17b487bdfb377f8d71d9d426078cdc7a0
Signed-off-by: default avatarJigarkumar Zala <jzala@codeaurora.org>
parent 93df147c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -606,8 +606,9 @@ int cam_sensor_match_id(struct cam_sensor_ctrl_t *s_ctrl)

	CAM_DBG(CAM_SENSOR, "read id: 0x%x expected id 0x%x:",
		chipid, slave_info->sensor_id);

	if (cam_sensor_id_by_mask(s_ctrl, chipid) != slave_info->sensor_id) {
		CAM_ERR(CAM_SENSOR, "chip id %x does not match %x",
		CAM_WARN(CAM_SENSOR, "read id: 0x%x expected id 0x%x:",
				chipid, slave_info->sensor_id);
		return -ENODEV;
	}
+7 −0
Original line number Diff line number Diff line
@@ -512,6 +512,13 @@ int cam_soc_util_get_option_clk_by_name(struct cam_hw_soc_info *soc_info,
	index = of_property_match_string(of_node, "clock-names-option",
		clk_name);

	if (index < 0) {
		CAM_INFO(CAM_UTIL, "No clk data for %s", clk_name);
		*clk_index = -1;
		*clk = ERR_PTR(-EINVAL);
		return -EINVAL;
	}

	*clk = cam_soc_util_option_clk_get(of_node, index);
	if (IS_ERR(*clk)) {
		CAM_ERR(CAM_UTIL, "No clk named %s found. Dev %s", clk_name,