diff options
| author | Andrew Goodbody <[email protected]> | 2025-08-12 14:31:16 +0100 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-28 10:33:00 -0600 |
| commit | c01280b62c44e2a6be57440939f1912e60a7d5ec (patch) | |
| tree | c3f52bfa58539f1ce463db98426df941b88fe51f | |
| parent | 094593bf82e78f913c32d10de9c7dbed0591abe9 (diff) | |
spi: ich: Do not use uninitialised value
In ich_spi_exec_op_swseq the variable with_address is only assigned a
value in the case of op->addr.nbytes being non-zero.
Initialise with_address to zero. so that it is always valid.
This issue was found by Smatch.
Signed-off-by: Andrew Goodbody <[email protected]>
| -rw-r--r-- | drivers/spi/ich.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/ich.c b/drivers/spi/ich.c index 2264ca83d66..733ff8ac777 100644 --- a/drivers/spi/ich.c +++ b/drivers/spi/ich.c @@ -256,7 +256,7 @@ static int ich_spi_exec_op_swseq(struct spi_slave *slave, struct ich_spi_priv *ctlr = dev_get_priv(bus); uint16_t control; int16_t opcode_index; - int with_address; + int with_address = 0; int status; struct spi_trans *trans = &ctlr->trans; bool lock = spi_lock_status(plat, ctlr->base); |
