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

Commit 24c790fb authored by Dan Carpenter's avatar Dan Carpenter Committed by Joerg Roedel
Browse files

iommu/amd: Missing error code in amd_iommu_init_device()



We should set "ret" to -EINVAL if iommu_group_get() fails.

Fixes: 55c99a4d ("iommu/amd: Use iommu_attach_group()")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 62280cf2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -805,8 +805,10 @@ int amd_iommu_init_device(struct pci_dev *pdev, int pasids)
		goto out_free_domain;

	group = iommu_group_get(&pdev->dev);
	if (!group)
	if (!group) {
		ret = -EINVAL;
		goto out_free_domain;
	}

	ret = iommu_attach_group(dev_state->domain, group);
	if (ret != 0)