diff options
Diffstat (limited to 'drivers/pci/controller/pci-hyperv.c')
-rw-r--r-- | drivers/pci/controller/pci-hyperv.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c index ee80e79db21a..9ba4d12c179c 100644 --- a/drivers/pci/controller/pci-hyperv.c +++ b/drivers/pci/controller/pci-hyperv.c | |||
@@ -1484,8 +1484,10 @@ static void hv_pci_assign_slots(struct hv_pcibus_device *hbus) | |||
1484 | snprintf(name, SLOT_NAME_SIZE, "%u", hpdev->desc.ser); | 1484 | snprintf(name, SLOT_NAME_SIZE, "%u", hpdev->desc.ser); |
1485 | hpdev->pci_slot = pci_create_slot(hbus->pci_bus, slot_nr, | 1485 | hpdev->pci_slot = pci_create_slot(hbus->pci_bus, slot_nr, |
1486 | name, NULL); | 1486 | name, NULL); |
1487 | if (!hpdev->pci_slot) | 1487 | if (IS_ERR(hpdev->pci_slot)) { |
1488 | pr_warn("pci_create slot %s failed\n", name); | 1488 | pr_warn("pci_create slot %s failed\n", name); |
1489 | hpdev->pci_slot = NULL; | ||
1490 | } | ||
1489 | } | 1491 | } |
1490 | } | 1492 | } |
1491 | 1493 | ||