acpi/ipmi: Initialize the fwinfo before fetching it
authorCorey Minyard <cminyard@mvista.com>
Mon, 24 Oct 2016 20:10:21 +0000 (15:10 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sat, 19 Nov 2016 01:05:21 +0000 (19:05 -0600)
The initialization was missed before, resulting in some
bad data in the smbus case.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 698ae42b9124dce23e03d0fea2e635b70540ef13)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/acpi/ipmi.c

index 7e74ce446001564afdc3d5d8586f3e6eb1e322e1..651e2e94ea965abd4fdb8bfd51ed3fdef1fb0441 100644 (file)
@@ -99,6 +99,7 @@ void build_acpi_ipmi_devices(Aml *scope, BusState *bus)
 
         ii = IPMI_INTERFACE(obj);
         iic = IPMI_INTERFACE_GET_CLASS(obj);
+        memset(&info, 0, sizeof(info));
         iic->get_fwinfo(ii, &info);
         aml_append(scope, aml_ipmi_device(&info));
     }