lkml.org 
[lkml]   [2023]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/2] soc: qcom: dcc: Delete some bogus dead code
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
\
 
 \ /
  Last update: 2023-03-26 23:28    [W:0.057 / U:0.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site