File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -361,10 +361,6 @@ int iommufd_hw_pagetable_attach(struct iommufd_hw_pagetable *hwpt,
361
361
if (rc )
362
362
goto err_unlock ;
363
363
364
- rc = iommufd_device_setup_msi (idev , hwpt , sw_msi_start );
365
- if (rc )
366
- goto err_unresv ;
367
-
368
364
/*
369
365
* Only attach to the group once for the first device that is in the
370
366
* group. All the other devices will follow this attachment. The user
@@ -373,6 +369,10 @@ int iommufd_hw_pagetable_attach(struct iommufd_hw_pagetable *hwpt,
373
369
* attachment.
374
370
*/
375
371
if (list_empty (& idev -> igroup -> device_list )) {
372
+ rc = iommufd_device_setup_msi (idev , hwpt , sw_msi_start );
373
+ if (rc )
374
+ goto err_unresv ;
375
+
376
376
rc = iommu_attach_group (hwpt -> domain , idev -> igroup -> group );
377
377
if (rc )
378
378
goto err_unresv ;
You can’t perform that action at this time.
0 commit comments