diff options
-rw-r--r-- | drivers/vfio/pci/vfio_pci.c | 6 | ||||
-rw-r--r-- | drivers/vfio/vfio_spapr_eeh.c | 4 | ||||
-rw-r--r-- | include/linux/vfio.h | 5 |
3 files changed, 5 insertions, 10 deletions
diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c index 1651c0769b72..f7825332a325 100644 --- a/drivers/vfio/pci/vfio_pci.c +++ b/drivers/vfio/pci/vfio_pci.c | |||
@@ -200,11 +200,7 @@ static int vfio_pci_open(void *device_data) | |||
200 | if (ret) | 200 | if (ret) |
201 | goto error; | 201 | goto error; |
202 | 202 | ||
203 | ret = vfio_spapr_pci_eeh_open(vdev->pdev); | 203 | vfio_spapr_pci_eeh_open(vdev->pdev); |
204 | if (ret) { | ||
205 | vfio_pci_disable(vdev); | ||
206 | goto error; | ||
207 | } | ||
208 | } | 204 | } |
209 | vdev->refcnt++; | 205 | vdev->refcnt++; |
210 | error: | 206 | error: |
diff --git a/drivers/vfio/vfio_spapr_eeh.c b/drivers/vfio/vfio_spapr_eeh.c index 4779cace8036..86dfceb9201f 100644 --- a/drivers/vfio/vfio_spapr_eeh.c +++ b/drivers/vfio/vfio_spapr_eeh.c | |||
@@ -19,9 +19,9 @@ | |||
19 | #define DRIVER_DESC "VFIO IOMMU SPAPR EEH" | 19 | #define DRIVER_DESC "VFIO IOMMU SPAPR EEH" |
20 | 20 | ||
21 | /* We might build address mapping here for "fast" path later */ | 21 | /* We might build address mapping here for "fast" path later */ |
22 | int vfio_spapr_pci_eeh_open(struct pci_dev *pdev) | 22 | void vfio_spapr_pci_eeh_open(struct pci_dev *pdev) |
23 | { | 23 | { |
24 | return eeh_dev_open(pdev); | 24 | eeh_dev_open(pdev); |
25 | } | 25 | } |
26 | EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_open); | 26 | EXPORT_SYMBOL_GPL(vfio_spapr_pci_eeh_open); |
27 | 27 | ||
diff --git a/include/linux/vfio.h b/include/linux/vfio.h index 224128a96b7f..d3204115f15d 100644 --- a/include/linux/vfio.h +++ b/include/linux/vfio.h | |||
@@ -100,15 +100,14 @@ extern long vfio_external_check_extension(struct vfio_group *group, | |||
100 | 100 | ||
101 | struct pci_dev; | 101 | struct pci_dev; |
102 | #ifdef CONFIG_EEH | 102 | #ifdef CONFIG_EEH |
103 | extern int vfio_spapr_pci_eeh_open(struct pci_dev *pdev); | 103 | extern void vfio_spapr_pci_eeh_open(struct pci_dev *pdev); |
104 | extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev); | 104 | extern void vfio_spapr_pci_eeh_release(struct pci_dev *pdev); |
105 | extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, | 105 | extern long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group, |
106 | unsigned int cmd, | 106 | unsigned int cmd, |
107 | unsigned long arg); | 107 | unsigned long arg); |
108 | #else | 108 | #else |
109 | static inline int vfio_spapr_pci_eeh_open(struct pci_dev *pdev) | 109 | static inline void vfio_spapr_pci_eeh_open(struct pci_dev *pdev) |
110 | { | 110 | { |
111 | return 0; | ||
112 | } | 111 | } |
113 | 112 | ||
114 | static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev) | 113 | static inline void vfio_spapr_pci_eeh_release(struct pci_dev *pdev) |