msm: camera: utils: populate applied clock rate properly

Currently applied clock rate variable is getting updated
with default -ve value for clocks for which no rate set.
This is giving wrong impression of clock rate being applied.

Updated applied clock rate based on clock rate value set.

CRs-Fixed: 3794045
Change-Id: Ib37165dbaf4c1ec56abff1d3ba3eaf21eae79734
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
This commit is contained in:
Alok Chauhan
2024-03-20 14:16:17 +05:30
parent c05628a87e
commit 1f72d2fd80

View File

@@ -1480,7 +1480,7 @@ static int cam_soc_util_set_clk_rate(struct cam_hw_soc_info *soc_info,
} }
} }
if (applied_clk_rate) if (applied_clk_rate && set_rate)
*applied_clk_rate = clk_rate_round; *applied_clk_rate = clk_rate_round;
return rc; return rc;