mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 22:50:41 +00:00
iommu/amd: Missing error code in amd_iommu_init_device()
We should set "ret" to -EINVAL if iommu_group_get() fails. Fixes: 55c99a4dc50f ("iommu/amd: Use iommu_attach_group()") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
62280cf2e8
commit
24c790fbf5
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user