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>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2] soc: qcom: dcc: Delete some bogus dead code
Date: Thu, 5 Jan 2023 13:54:13 +0300 [thread overview]
Message-ID: <Y7asVSr5ERGCZedk@kili> (raw)
In-Reply-To: <Y7asNqoIapctHmbI@kili>
It feels very wrong to assign "cfg.sram_offset" to be out of bounds.
Fortunately, this is just dead code and can be deleted.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
drivers/soc/qcom/dcc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/soc/qcom/dcc.c b/drivers/soc/qcom/dcc.c
index 1e2cbefc1655..681d55018e66 100644
--- a/drivers/soc/qcom/dcc.c
+++ b/drivers/soc/qcom/dcc.c
@@ -483,10 +483,8 @@ static int dcc_emit_config(struct dcc_drvdata *drvdata, unsigned int curr_list)
/* Update ram_cfg and check if the data will overstep */
drvdata->ram_cfg = (cfg.sram_offset + total_len) / 4;
- if (cfg.sram_offset + total_len > drvdata->ram_size) {
- cfg.sram_offset += total_len;
+ if (cfg.sram_offset + total_len > drvdata->ram_size)
goto overstep;
- }
drvdata->ram_start = cfg.sram_offset / 4;
return 0;
--
2.35.1
next prev parent reply other threads:[~2023-01-05 10:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 10:53 [PATCH 1/2] soc: qcom: dcc: Signedness bug in config_reset_write() Dan Carpenter
2023-01-05 10:54 ` Dan Carpenter [this message]
2023-01-05 11:47 ` 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=Y7asVSr5ERGCZedk@kili \
--to=error27@gmail.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox