IOMMU Fix for Linux v5.1-rc1

	- Fix a NULL-pointer dereference issue in the ACPI device
	  matching code of the AMD IOMMU driver
iommu/amd: Fix NULL dereference bug in match_hid_uid

Add a non-NULL check to fix potential NULL pointer dereference
Cleanup code to call function once.

Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Fixes: 2bf9a0a12749b ('iommu/amd: Add iommu support for ACPI HID devices')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 file changed