diff mbox series

[RFC,v1,2/3] vfio/platform: change cleanup order

Message ID 20201112175852.21572-3-vikas.gupta@broadcom.com (mailing list archive)
State New, archived
Headers show
Series msi support for platform devices | expand

Commit Message

Vikas Gupta Nov. 12, 2020, 5:58 p.m. UTC
In the case of msi, vendor specific msi module may require
region access to handle msi cleanup so we need to cleanup region
after irq cleanup only.

Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
---
 drivers/vfio/platform/vfio_platform_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/vfio/platform/vfio_platform_common.c b/drivers/vfio/platform/vfio_platform_common.c
index 226aa8083751..ca4a01c488b8 100644
--- a/drivers/vfio/platform/vfio_platform_common.c
+++ b/drivers/vfio/platform/vfio_platform_common.c
@@ -278,8 +278,8 @@  static void vfio_platform_release(void *device_data)
 			WARN_ON(1);
 		}
 		pm_runtime_put(vdev->device);
-		vfio_platform_regions_cleanup(vdev);
 		vfio_platform_irq_cleanup(vdev);
+		vfio_platform_regions_cleanup(vdev);
 	}
 
 	mutex_unlock(&driver_lock);