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

Commit dd6766ab 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: Check CLKFLAG_INIT_DONE flag for clk_get()"

parents edd7d3a4 f5cb564a
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -854,11 +854,15 @@ static struct clk *of_clk_src_get(struct of_phandle_args *clkspec,
				  void *data)
{
	struct of_msm_provider_data *ofdata = data;
	struct clk *c;
	int n;

	for (n = 0; n < ofdata->size; n++) {
		if (clkspec->args[0] == ofdata->table[n].of_idx)
			return ofdata->table[n].clk;
		if (clkspec->args[0] == ofdata->table[n].of_idx) {
			c = ofdata->table[n].clk;
			if (c->flags & CLKFLAG_INIT_DONE)
				return c;
		}
	}
	return ERR_PTR(-ENOENT);
}