iommufd/selftest: fix unregister device
PATCH 1/1 iommufd/selftest: fix unregister device
It should call platform_device_unregister() instead of platform_device_del() to unregister the device.
Fixes 23a1b46f15d5 ("iommufd/selftest: Make the mock iommu driver into a real driver")
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/iommu/iommufd/selftest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/iommu/iommufd/selftest.c +2 -2
@@ -1073,7 +1073,7 @@ int __init iommufd_test_init(void) err_bus:bus_unregister (&iommufd_mock_bus_type.bus); err_platform: -platform_device_del (selftest_iommu_dev); +platform_device_unregister (selftest_iommu_dev); err_dbgfs:debugfs_remove_recursive (dbgfs_root);return rc;
@@ -1086,6 +1086,6 @@ void iommufd_test_exit(void) &iommufd_mock_bus_type.bus, &iommufd_mock_bus_type.nb);bus_unregister (&iommufd_mock_bus_type.bus); -platform_device_del (selftest_iommu_dev); +platform_device_unregister (selftest_iommu_dev);debugfs_remove_recursive (dbgfs_root); }
Signature · 1 line
2.25.1
Quoted 9 lines
From: Yang Yingliang <[email protected]>
Sent: Wednesday, August 16, 2023 4:13 PMIt should call
platform_device_unregister()instead ofplatform_device_del()to unregister the device.Fixes 23a1b46f15d5 ("iommufd/selftest: Make the mock iommu driver into areal driver")
Signed-off-by Yang Yingliang <[email protected]>
Reviewed-by Kevin Tian <[email protected]>
Jason Gunthorpe
AppliedQuoted 8 lines · Yang Yingliang
It should call
platform_device_unregister()instead ofplatform_device_del()to unregister the device.Fixes 23a1b46f15d5 ("iommufd/selftest: Make the mock iommu driver into a real driver")Signed-off-by Yang Yingliang <[email protected]>--- drivers/iommu/iommufd/selftest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Applied, thanks
Jason