aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen')
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index 4e8ba38aa0c9..002089918260 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -1196,19 +1196,23 @@ static ssize_t pcistub_irq_handler_switch(struct device_driver *drv,
1196 struct pcistub_device *psdev; 1196 struct pcistub_device *psdev;
1197 struct xen_pcibk_dev_data *dev_data; 1197 struct xen_pcibk_dev_data *dev_data;
1198 int domain, bus, slot, func; 1198 int domain, bus, slot, func;
1199 int err = -ENOENT; 1199 int err;
1200 1200
1201 err = str_to_slot(buf, &domain, &bus, &slot, &func); 1201 err = str_to_slot(buf, &domain, &bus, &slot, &func);
1202 if (err) 1202 if (err)
1203 return err; 1203 return err;
1204 1204
1205 psdev = pcistub_device_find(domain, bus, slot, func); 1205 psdev = pcistub_device_find(domain, bus, slot, func);
1206 if (!psdev) 1206 if (!psdev) {
1207 err = -ENOENT;
1207 goto out; 1208 goto out;
1209 }
1208 1210
1209 dev_data = pci_get_drvdata(psdev->dev); 1211 dev_data = pci_get_drvdata(psdev->dev);
1210 if (!dev_data) 1212 if (!dev_data) {
1213 err = -ENOENT;
1211 goto out; 1214 goto out;
1215 }
1212 1216
1213 dev_dbg(&psdev->dev->dev, "%s fake irq handler: %d->%d\n", 1217 dev_dbg(&psdev->dev->dev, "%s fake irq handler: %d->%d\n",
1214 dev_data->irq_name, dev_data->isr_on, 1218 dev_data->irq_name, dev_data->isr_on,