summaryrefslogtreecommitdiffstats
path: root/ichspi.c
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2021-06-07 13:29:13 +0200
committerNico Huber <nico.h@gmx.de>2021-06-09 16:07:45 +0000
commitf41d24823c1703e328fc27588bbcf3c96eecdbc9 (patch)
tree3bd19f60db955c7206fa72a1ccdb7a2607e7001d /ichspi.c
parent3bd47524c044168b01e54e772d23c7fa723dc0d5 (diff)
downloadflashrom-f41d24823c1703e328fc27588bbcf3c96eecdbc9.tar.gz
flashrom-f41d24823c1703e328fc27588bbcf3c96eecdbc9.tar.bz2
flashrom-f41d24823c1703e328fc27588bbcf3c96eecdbc9.zip
treewide: Drop unnecessary uses of memset/memcpy
Simply provide an initialiser or use a direct assignment instead. Change-Id: I07385375cd8eec8a95874001b402b2c17ec09e09 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/55267 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'ichspi.c')
-rw-r--r--ichspi.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ichspi.c b/ichspi.c
index 20dac1b48..091e4e200 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1720,7 +1720,7 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
char *arg;
int ich_spi_rw_restricted = 0;
int desc_valid = 0;
- struct ich_descriptors desc;
+ struct ich_descriptors desc = { 0 };
enum ich_spi_mode {
ich_auto,
ich_hwseq,
@@ -1731,8 +1731,6 @@ int ich_init_spi(void *spibar, enum ich_chipset ich_gen)
ich_generation = ich_gen;
ich_spibar = spibar;
- memset(&desc, 0x00, sizeof(desc));
-
/* Moving registers / bits */
switch (ich_gen) {
case CHIPSET_100_SERIES_SUNRISE_POINT: