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@xxxxxxxxxxxxxx> --- drivers/misc/ubootvar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/misc/ubootvar.c b/drivers/misc/ubootvar.c index d98a6ed9a742..723e9e2b547a 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]; -- 2.30.2