]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Fix NULL dereference bug in match_hid_uid
authorAaron Ma <aaron.ma@canonical.com>
Wed, 13 Mar 2019 13:53:24 +0000 (21:53 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Mar 2019 15:22:05 +0000 (16:22 +0100)
commit420b15cf86a519b53228351ce7c34917941d0f3d
tree6ecc7bc4382425f2d9a4b0188848b9454261cbf9
parent285ea13f6ab4ba5fc78a75db7c484f305c3d2b84
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: 6b21ab901da18 ('iommu/amd: Add iommu support for ACPI HID devices')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c