iommu/amd: Missing error code in amd_iommu_init_device()
commit48ffae87e91346382790af10d793cba4d2e1d341
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Nov 2016 11:05:44 +0000 (24 14:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:28 +0000 (12 11:39 +0100)
tree5d6ccb79ea32925ab8e3792651177f99a4dcdf54
parent54eed7ab1367f3d802ba516a60967e8547224a55
iommu/amd: Missing error code in amd_iommu_init_device()

commit 24c790fbf5d8f54c8c82979db11edea8855b74bf upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/amd_iommu_v2.c