iommu/vt-d: Check return value of acpi_bus_get_device()
authorJoerg Roedel <jroedel@suse.de>
Thu, 21 Aug 2014 21:06:48 +0000 (23:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 20:40:59 +0000 (13:40 -0700)
commit45b03a62e3d86c405b9dd21068fe77a9a144971f
tree9a4062b0fe113285ebd4535404ccb53b057120bc
parent7e6db41703b15e883cb4cd7eebfd5175e9adecc3
iommu/vt-d: Check return value of acpi_bus_get_device()

commit c0df975f9045d6b2b13d88746e628ac308ff49ea upstream.

Checking adev == NULL is not sufficient as
acpi_bus_get_device() might not touch the value of this
parameter in an error case, so check the return value
directly.

Fixes: ed40356b5fcf1ce28e026ab39c5b2b6939068b50
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/dmar.c