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

Commit 34af16a2 authored by Andy Sun's avatar Andy Sun Committed by Gerrit - the friendly Code Review server
Browse files

ais: always do clock set_rate after get_rate



Before clock enable, should always set rate firstly for safety,
in case the value after get rate changes.

Change-Id: I6985d9ab413012e988434ee3a8ea78b0beb803d2
Signed-off-by: default avatarAndy Sun <bins@codeaurora.org>
parent 96e3d4de
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -379,6 +379,7 @@ int msm_camera_clk_enable(struct device *dev,
							  clk_info[i].clk_name);
						goto cam_clk_set_err;
					}
				}
				rc = clk_set_rate(clk_ptr[i],
							clk_rate);
				if (rc < 0) {
@@ -387,7 +388,6 @@ int msm_camera_clk_enable(struct device *dev,
					goto cam_clk_set_err;
				}
			}
			}
			rc = clk_prepare_enable(clk_ptr[i]);
			if (rc < 0) {
				pr_err("%s enable failed\n",