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

Commit 105a004e authored by weiyongjun (A)'s avatar weiyongjun (A) Committed by Alex Williamson
Browse files

iommu/ipmmu-vmsa: Fix return value check in ipmmu_find_group_dma()



In case of error, the function iommu_group_get() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Fixes: 3ae47292 ("iommu/ipmmu-vmsa: Add new IOMMU_DOMAIN_DMA ops")
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent a5934725
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -871,7 +871,7 @@ static struct iommu_group *ipmmu_find_group_dma(struct device *dev)
	sibling = ipmmu_find_sibling_device(dev);
	sibling = ipmmu_find_sibling_device(dev);
	if (sibling)
	if (sibling)
		group = iommu_group_get(sibling);
		group = iommu_group_get(sibling);
	if (!sibling || IS_ERR(group))
	if (!sibling || !group)
		group = generic_device_group(dev);
		group = generic_device_group(dev);


	return group;
	return group;