aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/xen-pcifront.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c
index 05792732718e..3a5a6fcc0ead 100644
--- a/drivers/pci/xen-pcifront.c
+++ b/drivers/pci/xen-pcifront.c
@@ -575,8 +575,9 @@ static pci_ers_result_t pcifront_common_process(int cmd,
575 575
576 pcidev = pci_get_bus_and_slot(bus, devfn); 576 pcidev = pci_get_bus_and_slot(bus, devfn);
577 if (!pcidev || !pcidev->driver) { 577 if (!pcidev || !pcidev->driver) {
578 dev_err(&pcidev->dev, 578 dev_err(&pdev->xdev->dev, "device or AER driver is NULL\n");
579 "device or driver is NULL\n"); 579 if (pcidev)
580 pci_dev_put(pcidev);
580 return result; 581 return result;
581 } 582 }
582 pdrv = pcidev->driver; 583 pdrv = pcidev->driver;