Commit d4f6e272 authored by Dan Carpenter's avatar Dan Carpenter Committed by Michael S. Tsirkin

firmware: qemu_fw_cfg.c: potential unintialized variable

It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't
initialized, which, if you got very unlucky, could cause a bug.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent c3b46c73
...@@ -77,7 +77,7 @@ static inline u16 fw_cfg_sel_endianness(u16 key) ...@@ -77,7 +77,7 @@ static inline u16 fw_cfg_sel_endianness(u16 key)
static inline void fw_cfg_read_blob(u16 key, static inline void fw_cfg_read_blob(u16 key,
void *buf, loff_t pos, size_t count) void *buf, loff_t pos, size_t count)
{ {
u32 glk; u32 glk = -1U;
acpi_status status; acpi_status status;
/* If we have ACPI, ensure mutual exclusion against any potential /* If we have ACPI, ensure mutual exclusion against any potential
......
Markdown is supported
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