All of lore.kernel.org
 help / color / mirror / Atom feed
From: djakov@kernel.org
To: djakov@kernel.org, konrad.dybcio@linaro.org, andersson@kernel.org
Cc: stephan@gerhold.net, linux-arm-msm@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] interconnect: qcom: icc-rpm: Initialize ret variable to fix smatch error
Date: Mon, 17 Jul 2023 10:34:29 +0300	[thread overview]
Message-ID: <20230717073429.2115015-1-djakov@kernel.org> (raw)

From: Georgi Djakov <djakov@kernel.org>

Fix the following smatch error:
drivers/interconnect/qcom/icc-rpm.c:243 qcom_icc_rpm_set() error: uninitialized symbol 'ret'.

Fixes: 32846c4a8f2a ("interconnect: qcom: icc-rpm: Set bandwidth on both contexts")
Signed-off-by: Georgi Djakov <djakov@kernel.org>
---
 drivers/interconnect/qcom/icc-rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
index 612390b9eb18..6718cc648d75 100644
--- a/drivers/interconnect/qcom/icc-rpm.c
+++ b/drivers/interconnect/qcom/icc-rpm.c
@@ -206,7 +206,7 @@ static int qcom_icc_qos_set(struct icc_node *node)
 
 static int qcom_icc_rpm_set(struct qcom_icc_node *qn, u64 *bw)
 {
-	int ret, rpm_ctx = 0;
+	int ret = 0, rpm_ctx = 0;
 	u64 bw_bps;
 
 	if (qn->qos.ap_owned)

             reply	other threads:[~2023-07-17  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17  7:34 djakov [this message]
2023-07-17 10:52 ` [PATCH] interconnect: qcom: icc-rpm: Initialize ret variable to fix smatch error Stephan Gerhold
2023-07-17 12:55   ` [PATCH v2] interconnect: qcom: icc-rpm: Explicitly return 0 at the end of the function djakov
2023-07-17 13:04     ` Stephan Gerhold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230717073429.2115015-1-djakov@kernel.org \
    --to=djakov@kernel.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=stephan@gerhold.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.