Skip to content

Commit 33fa303

Browse files
author
Fox Snowpatch
committed
1 parent 35d5936 commit 33fa303

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

arch/powerpc/kernel/iommu.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -1285,15 +1285,14 @@ spapr_tce_platform_iommu_attach_dev(struct iommu_domain *platform_domain,
12851285
struct device *dev)
12861286
{
12871287
struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
1288-
struct iommu_group *grp = iommu_group_get(dev);
12891288
struct iommu_table_group *table_group;
1289+
struct iommu_group *grp;
12901290

12911291
/* At first attach the ownership is already set */
1292-
if (!domain) {
1293-
iommu_group_put(grp);
1292+
if (!domain)
12941293
return 0;
1295-
}
12961294

1295+
grp = iommu_group_get(dev);
12971296
table_group = iommu_group_get_iommudata(grp);
12981297
/*
12991298
* The domain being set to PLATFORM from earlier

0 commit comments

Comments
 (0)