Skip to content
Commit 420c4495 authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Miquel Raynal
Browse files

mtd: spi-nor: spansion: make sure local struct does not contain garbage



Following errors were seen with um-x86_64-gcc12/um-allyesconfig:
+ /kisskb/src/drivers/mtd/spi-nor/spansion.c: error: 'op' is used uninitialized [-Werror=uninitialized]:  => 495:27, 364:27

Initialise local struct spi_mem_op with all zeros at declaration in
order to avoid using garbage data for fields that are not explicitly
set afterwards.

Reported-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Fixes: c87c9b11 ("mtd: spi-nor: spansion: Determine current address mode")
Fixes: 6afcc840

 ("mtd: spi-nor: spansion: Add support for Infineon S25FS256T")
Signed-off-by: default avatarTudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230509193900.948753-1-tudor.ambarus@linaro.org
parent 44c026a7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment