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

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

Merge "interconnect: qcom: Add check to return status of clk_bulk_prepare_enable"

parents f6564e6e 281d369b
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
	struct qcom_icc_provider *qp;
	struct qcom_icc_node *qn;
	struct icc_node *node;
	int i;
	int i, ret = 0;

	if (!src)
		node = dst;
@@ -100,13 +100,19 @@ int qcom_icc_set(struct icc_node *src, struct icc_node *dst)
	/* Defer setting QoS until the first non-zero bandwidth request. */
	if (qn && qn->qosbox && !qn->qosbox->initialized &&
	    (node->avg_bw || node->peak_bw)) {
		clk_bulk_prepare_enable(qp->num_clks, qp->clks);
		ret = clk_bulk_prepare_enable(qp->num_clks, qp->clks);
		if (ret) {
			pr_err("%s: Clock enable failed for node %s\n",
				__func__, node->name);
			return ret;
		}

		qn->noc_ops->set_qos(qn);
		clk_bulk_disable_unprepare(qp->num_clks, qp->clks);
		qn->qosbox->initialized = true;
	}

	return 0;
	return ret;
}
EXPORT_SYMBOL(qcom_icc_set);