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

Commit 281d369b authored by Naveen Yadav's avatar Naveen Yadav
Browse files

interconnect: qcom: Add check to return status of clk_bulk_prepare_enable



Since clk_bulk_prepare_enable function is defined with __must_check option,
add check to return status of clk_bulk_prepare_enable in qcom_icc_set
function.

Change-Id: I69fed5bdda38edfa89af3d899333d6e6f9f939f9
Signed-off-by: default avatarNaveen Yadav <naveenky@codeaurora.org>
parent 485cd699
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);