From: Dan Carpenter <error27@gmail.com>
To: Souradeep Chowdhury <quic_schowdhu@quicinc.com>
Cc: Andy Gross <agross@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Alex Elder <elder@linaro.org>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] soc: qcom: dcc: Signedness bug in config_reset_write()
Date: Thu, 5 Jan 2023 13:53:42 +0300 [thread overview]
Message-ID: <Y7asNqoIapctHmbI@kili> (raw)
The "ret" variable needs to be signed for the error handling to work.
Fixes: 4cbe60cf5ad6 ("soc: qcom: dcc: Add driver support for Data Capture and Compare unit(DCC)")
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/soc/qcom/dcc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/qcom/dcc.c b/drivers/soc/qcom/dcc.c
index d4101f79cb5d..1e2cbefc1655 100644
--- a/drivers/soc/qcom/dcc.c
+++ b/drivers/soc/qcom/dcc.c
@@ -808,8 +808,9 @@ static ssize_t config_reset_write(struct file *filp,
const char __user *user_buf, size_t count,
loff_t *ppos)
{
- unsigned int val, ret;
+ unsigned int val;
struct dcc_drvdata *drvdata = filp->private_data;
+ int ret;
ret = kstrtouint_from_user(user_buf, count, 0, &val);
if (ret < 0)
--
2.35.1
next reply other threads:[~2023-01-05 10:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 10:53 Dan Carpenter [this message]
2023-01-05 10:54 ` [PATCH 2/2] soc: qcom: dcc: Delete some bogus dead code Dan Carpenter
2023-01-05 11:47 ` [PATCH 1/2] soc: qcom: dcc: Signedness bug in config_reset_write() Konrad Dybcio
2023-01-05 13:30 ` Dan Carpenter
2023-01-05 13:49 ` Alex Elder
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=Y7asNqoIapctHmbI@kili \
--to=error27@gmail.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=elder@linaro.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=konrad.dybcio@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=quic_schowdhu@quicinc.com \
/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.