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

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

Merge "crypto: msm: Fix clk initialization"

parents 3dbe4a95 d00d19b1
Loading
Loading
Loading
Loading
+23 −15
Original line number Diff line number Diff line
@@ -5257,13 +5257,22 @@ static int __qce_init_clk(struct qce_device *pce_dev)
					pce_dev->ce_opp_freq_hz/CE_CLK_DIV);
			goto exit_put_core_src_clk;
		}
	} else {
		if (pce_dev->support_only_core_src_clk) {
			rc = PTR_ERR(pce_dev->ce_core_src_clk);
			pce_dev->ce_core_src_clk = NULL;
			pr_err("Unable to get CE core src clk\n");
			return rc;
		} else {
			pr_warn("Unable to get CE core src clk, set to NULL\n");
			pce_dev->ce_core_src_clk = NULL;
		}
	}

	if (pce_dev->support_only_core_src_clk) {
		pce_dev->ce_core_clk = NULL;
		pce_dev->ce_clk = NULL;
		pce_dev->ce_bus_clk = NULL;
	} else {
		pce_dev->ce_core_clk = clk_get(pce_dev->pdev, "core_clk");
		if (IS_ERR(pce_dev->ce_core_clk)) {
@@ -5271,8 +5280,6 @@ static int __qce_init_clk(struct qce_device *pce_dev)
			pr_err("Unable to get CE core clk\n");
			goto exit_put_core_src_clk;
		}
	}

		pce_dev->ce_clk = clk_get(pce_dev->pdev, "iface_clk");
		if (IS_ERR(pce_dev->ce_clk)) {
			rc = PTR_ERR(pce_dev->ce_clk);
@@ -5286,6 +5293,7 @@ static int __qce_init_clk(struct qce_device *pce_dev)
			pr_err("Unable to get CE BUS interface clk\n");
			goto exit_put_iface_clk;
		}
	}
	return rc;

exit_put_iface_clk: