iommu/amd: Missing error code in amd_iommu_init_device()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 24 Nov 2016 11:05:44 +0000 (14:05 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:22:49 +0000 (11:22 +0100)
commitb54dcc3b68efbcd3092121ff517268ce1f81c8d3
tree460e5a41c6a120436c907dbdfaeaa0f3262ed837
parent46105512474f1cadfdf20af5ac1f3d1c85d39507
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