summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-09-05 11:55:45 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-12 12:05:01 +0200
commit766ef5950b09ce9001738fe15c22faa8efe8b57b (patch)
tree6dbbe1a09b85e87e43b6ad665358e19090f04a45 /drivers
parenta93da5c729a82b94a5ff402a084a9ca937d148a3 (diff)
downloadbarebox-766ef5950b09ce9001738fe15c22faa8efe8b57b.tar.gz
barebox-766ef5950b09ce9001738fe15c22faa8efe8b57b.tar.xz
misc: ubootvar: always initialize struct ubootvar_data::flag
The flag member is only relevant to redundant environments, still we shouldn't store garbage there for the non-redundant case. Thus initialize it to an acceptable default: FLAG_NONE. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220905095557.596891-21-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/misc/ubootvar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/ubootvar.c b/drivers/misc/ubootvar.c
index d98a6ed9a7..723e9e2b54 100644
--- a/drivers/misc/ubootvar.c
+++ b/drivers/misc/ubootvar.c
@@ -181,7 +181,7 @@ static int ubootenv_probe(struct device_d *dev)
unsigned int crc_ok = 0;
int ret, i, current, count = 0;
uint32_t crc[2];
- uint8_t flag[2];
+ uint8_t flag[2] = { FLAG_NONE, FLAG_NONE };
size_t size[2];
void *blob[2] = { NULL, NULL };
uint8_t *data[2];