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

Commit ad0212ec authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "clk: qcom: clk-spmi-pmic-div: avoid potential divide-by-0"

parents 8f743e83 22c2040e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -245,6 +245,10 @@ static int spmi_pmic_clkdiv_probe(struct platform_device *pdev)
	}
	cxo_hz = clk_get_rate(cxo);
	clk_put(cxo);
	if (cxo_hz <= 0) {
		dev_err(dev, "invalid CXO rate: %d\n", cxo_hz);
		return -EINVAL;
	}

	parent_name = of_clk_get_parent_name(of_node, 0);
	if (!parent_name) {