iommu/amd: Initialize devid variable before using it
authorNicolas Iooss <nicolas.iooss_linux@m4x.org>
Sun, 26 Jun 2016 08:33:29 +0000 (10:33 +0200)
committerJoerg Roedel <jroedel@suse.de>
Mon, 27 Jun 2016 11:24:46 +0000 (13:24 +0200)
Commit 2a0cb4e2d423 ("iommu/amd: Add new map for storing IVHD dev entry
type HID") added a call to DUMP_printk in init_iommu_from_acpi() which
used the value of devid before this variable was initialized.

Fixes: 2a0cb4e2d423 ('iommu/amd: Add new map for storing IVHD dev entry type HID')
Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu_init.c

index 9e0034196e10468ea6e624b64737a1487dade7fa..d091defc34260e23d04969f2c93445342387da49 100644 (file)
@@ -1107,13 +1107,13 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu,
                                break;
                        }
 
+                       devid = e->devid;
                        DUMP_printk("  DEV_ACPI_HID(%s[%s])\t\tdevid: %02x:%02x.%x\n",
                                    hid, uid,
                                    PCI_BUS_NUM(devid),
                                    PCI_SLOT(devid),
                                    PCI_FUNC(devid));
 
-                       devid  = e->devid;
                        flags = e->flags;
 
                        ret = add_acpi_hid_device(hid, uid, &devid, false);
This page took 0.026639 seconds and 5 git commands to generate.