File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1280,13 +1280,19 @@ struct iommu_table_group_ops spapr_tce_table_group_ops = {
1280
1280
/*
1281
1281
* A simple iommu_ops to allow less cruft in generic VFIO code.
1282
1282
*/
1283
- static int spapr_tce_platform_iommu_attach_dev (struct iommu_domain * dom ,
1284
- struct device * dev )
1283
+ static int
1284
+ spapr_tce_platform_iommu_attach_dev (struct iommu_domain * platform_domain ,
1285
+ struct device * dev )
1285
1286
{
1287
+ struct iommu_domain * domain = iommu_get_domain_for_dev (dev );
1286
1288
struct iommu_group * grp = iommu_group_get (dev );
1287
1289
struct iommu_table_group * table_group ;
1288
1290
int ret = - EINVAL ;
1289
1291
1292
+ /* At first attach the ownership is already set */
1293
+ if (!domain )
1294
+ return 0 ;
1295
+
1290
1296
if (!grp )
1291
1297
return - ENODEV ;
1292
1298
You can’t perform that action at this time.
0 commit comments