msm: camera: common: Fix enable/disable for dsp clock source

Currently, if dsp clock source is not found in device tree, still
we are trying to enable/disable clock source. Check for availability
of that optional clock before toggling it.

CRs-Fixed: 2762106
Change-Id: I2a4467f5383343bdf1e6607712270f574c76e51e
Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
This commit is contained in:
Mukund Madhusudan Atre
2020-08-27 17:58:52 -07:00
parent 8fe045c35a
commit 4f8f47ab0f
2 changed files with 22 additions and 6 deletions

View File

@@ -544,7 +544,6 @@ 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_DBG(CAM_UTIL, "No clk data for %s", clk_name);
*clk_index = -1;
@@ -557,6 +556,7 @@ int cam_soc_util_get_option_clk_by_name(struct cam_hw_soc_info *soc_info,
CAM_ERR(CAM_UTIL, "No clk named %s found. Dev %s", clk_name,
soc_info->dev_name);
*clk_index = -1;
*clk = NULL;
return -EFAULT;
}
*clk_index = index;