Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3c9c0f2 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "arm-smmu: Fix iommu group refcount leak"

parents e28d7965 b6ac46db
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -3023,7 +3023,6 @@ static int __bus_lookup_iommu_group(struct device *dev, void *priv)
	}

	data->group = group;
	iommu_group_put(group);
	return 1;
}

@@ -3703,6 +3702,9 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev)
	int i, idx;

	group = of_get_device_group(dev);
	if (group)
		goto finish;

	for_each_cfg_sme(fwspec, i, idx) {
		if (group && smmu->s2crs[idx].group &&
		    group != smmu->s2crs[idx].group) {
@@ -3729,6 +3731,7 @@ static struct iommu_group *arm_smmu_device_group(struct device *dev)
			return NULL;
	}

finish:
	if (smmu->impl && smmu->impl->device_group &&
	    smmu->impl->device_group(dev, group)) {
		iommu_group_put(group);