iommu: Check the result of iommu_group_get() for NULL
authorJordan Crouse <jcrouse@codeaurora.org>
Wed, 20 Dec 2017 16:48:36 +0000 (09:48 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Wed, 20 Dec 2017 16:48:36 +0000 (09:48 -0700)
commit9ae9df035c274c89b7fe3dbc74cbe2fa63386668
tree605af1864dcdf4a50d3f0902c82365a744d27f11
parent1291a0d5049dbc06baaaf66a9ff3f53db493b19b
iommu: Check the result of iommu_group_get() for NULL

The result of iommu_group_get() was being blindly used in both
attach and detach which results in a dereference when trying
to work with an unknown device.

Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
drivers/iommu/iommu.c