diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-04-14 12:33:37 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-04-21 16:12:36 +0300 |
commit | d4f6e272f2600bc1295d195a52a9e8bb81656bc7 (patch) | |
tree | d4925bcb341bfd3edfadede979ea3c0e26b8bffb /drivers | |
parent | c3b46c73264b03000d1e18b22f5caf63332547c9 (diff) | |
download | talos-obmc-linux-d4f6e272f2600bc1295d195a52a9e8bb81656bc7.tar.gz talos-obmc-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')
-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 |