diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-14 11:33:37 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-04-21 15:12:36 +0200 |
commit | d4f6e272f2600bc1295d195a52a9e8bb81656bc7 (patch) | |
tree | d4925bcb341bfd3edfadede979ea3c0e26b8bffb /drivers/firmware/qemu_fw_cfg.c | |
parent | Linux 4.6-rc4 (diff) | |
download | linux-d4f6e272f2600bc1295d195a52a9e8bb81656bc7.tar.xz linux-d4f6e272f2600bc1295d195a52a9e8bb81656bc7.zip |
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>
Diffstat (limited to 'drivers/firmware/qemu_fw_cfg.c')
-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) static inline void fw_cfg_read_blob(u16 key, void *buf, loff_t pos, size_t count) { - u32 glk; + u32 glk = -1U; acpi_status status; /* If we have ACPI, ensure mutual exclusion against any potential |