]> 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)
commite41c45418748b9e3fa69d23ffa6285cff426e6ab
tree6ecc7bc4382425f2d9a4b0188848b9454261cbf9
parent76cc8f41de15ad434882132b4df9c2863b7e47c5
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: a5c55ab155815 ('iommu/amd: Add iommu support for ACPI HID devices')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd_iommu.c