diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-14 05:33:37 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-04-21 09:12:36 -0400 |
commit | d4f6e272f2600bc1295d195a52a9e8bb81656bc7 (patch) | |
tree | d4925bcb341bfd3edfadede979ea3c0e26b8bffb | |
parent | c3b46c73264b03000d1e18b22f5caf63332547c9 (diff) |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rw-r--r-- | drivers/firmware/qemu_fw_cfg.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/firmware/qemu_fw_cfg.c index 815c4a5cae54..1b95475b6aef 100644 --- a/drivers/firmware/qemu_fw_cfg.c +++ b/drivers/firmware/qemu_fw_cfg.c | |||
@@ -77,7 +77,7 @@ static inline u16 fw_cfg_sel_endianness(u16 key) | |||
77 | static inline void fw_cfg_read_blob(u16 key, | 77 | static inline void fw_cfg_read_blob(u16 key, |
78 | void *buf, loff_t pos, size_t count) | 78 | void *buf, loff_t pos, size_t count) |
79 | { | 79 | { |
80 | u32 glk; | 80 | u32 glk = -1U; |
81 | acpi_status status; | 81 | acpi_status status; |
82 | 82 | ||
83 | /* If we have ACPI, ensure mutual exclusion against any potential | 83 | /* If we have ACPI, ensure mutual exclusion against any potential |