diff options
Diffstat (limited to 'drivers/pci/xen-pcifront.c')
-rw-r--r-- | drivers/pci/xen-pcifront.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 116ca3746adb..b1ffebec9b9e 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -596,8 +596,7 @@ static pci_ers_result_t pcifront_common_process(int cmd, | |||
596 | pcidev = pci_get_bus_and_slot(bus, devfn); | 596 | pcidev = pci_get_bus_and_slot(bus, devfn); |
597 | if (!pcidev || !pcidev->driver) { | 597 | if (!pcidev || !pcidev->driver) { |
598 | dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n"); | 598 | dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n"); |
599 | if (pcidev) | 599 | pci_dev_put(pcidev); |
600 | pci_dev_put(pcidev); | ||
601 | return result; | 600 | return result; |
602 | } | 601 | } |
603 | pdrv = pcidev->driver; | 602 | pdrv = pcidev->driver; |
@@ -866,6 +865,11 @@ static int pcifront_try_connect(struct pcifront_device *pdev) | |||
866 | xenbus_dev_error(pdev->xdev, err, | 865 | xenbus_dev_error(pdev->xdev, err, |
867 | "No PCI Roots found, trying 0000:00"); | 866 | "No PCI Roots found, trying 0000:00"); |
868 | err = pcifront_scan_root(pdev, 0, 0); | 867 | err = pcifront_scan_root(pdev, 0, 0); |
868 | if (err) { | ||
869 | xenbus_dev_fatal(pdev->xdev, err, | ||
870 | "Error scanning PCI root 0000:00"); | ||
871 | goto out; | ||
872 | } | ||
869 | num_roots = 0; | 873 | num_roots = 0; |
870 | } else if (err != 1) { | 874 | } else if (err != 1) { |
871 | if (err == 0) | 875 | if (err == 0) |
@@ -947,6 +951,11 @@ static int pcifront_attach_devices(struct pcifront_device *pdev) | |||
947 | xenbus_dev_error(pdev->xdev, err, | 951 | xenbus_dev_error(pdev->xdev, err, |
948 | "No PCI Roots found, trying 0000:00"); | 952 | "No PCI Roots found, trying 0000:00"); |
949 | err = pcifront_rescan_root(pdev, 0, 0); | 953 | err = pcifront_rescan_root(pdev, 0, 0); |
954 | if (err) { | ||
955 | xenbus_dev_fatal(pdev->xdev, err, | ||
956 | "Error scanning PCI root 0000:00"); | ||
957 | goto out; | ||
958 | } | ||
950 | num_roots = 0; | 959 | num_roots = 0; |
951 | } else if (err != 1) { | 960 | } else if (err != 1) { |
952 | if (err == 0) | 961 | if (err == 0) |