aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/vfio/vfio_iommu_spapr_tce.c10
-rw-r--r--drivers/vfio/vfio_spapr_eeh.c6
2 files changed, 4 insertions, 12 deletions
diff --git a/drivers/vfio/vfio_iommu_spapr_tce.c b/drivers/vfio/vfio_iommu_spapr_tce.c
index 169f07ac162d..73cec2beae70 100644
--- a/drivers/vfio/vfio_iommu_spapr_tce.c
+++ b/drivers/vfio/vfio_iommu_spapr_tce.c
@@ -785,14 +785,12 @@ static long tce_iommu_ioctl(void *iommu_data,
switch (arg) {
case VFIO_SPAPR_TCE_IOMMU:
case VFIO_SPAPR_TCE_v2_IOMMU:
- ret = 1;
- break;
+ return 1;
+ case VFIO_EEH:
+ return eeh_enabled();
default:
- ret = vfio_spapr_iommu_eeh_ioctl(NULL, cmd, arg);
- break;
+ return 0;
}
-
- return (ret < 0) ? 0 : ret;
}
/*
diff --git a/drivers/vfio/vfio_spapr_eeh.c b/drivers/vfio/vfio_spapr_eeh.c
index c9d102aafbcd..221b1b637e18 100644
--- a/drivers/vfio/vfio_spapr_eeh.c
+++ b/drivers/vfio/vfio_spapr_eeh.c
@@ -24,12 +24,6 @@ long vfio_spapr_iommu_eeh_ioctl(struct iommu_group *group,
long ret = -EINVAL;
switch (cmd) {
- case VFIO_CHECK_EXTENSION:
- if (arg == VFIO_EEH)
- ret = eeh_enabled() ? 1 : 0;
- else
- ret = 0;
- break;
case VFIO_EEH_PE_OP:
pe = eeh_iommu_group_to_pe(group);
if (!pe)