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

Commit 883a65a4 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: clk-alpha-pll: Check for the parent rate during round_rate" into msm-4.9

parents 0f398623 b0823d0f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -307,6 +307,15 @@ alpha_pll_round_rate(const struct clk_alpha_pll *pll, unsigned long rate,
	u64 quotient;
	int alpha_bw = ALPHA_BITWIDTH;

	/*
	 * The PLLs parent rate is zero probably since the parent hasn't
	 * registered yet. Return early with the requested rate.
	 */
	if (!prate) {
		pr_debug("PLLs parent rate hasn't been initialized.\n");
		return rate;
	}

	quotient = rate;
	remainder = do_div(quotient, prate);
	*l = quotient;