iommu/vt-d: Check for allocation failure in aux_detach_device()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 19 May 2021 01:50:26 +0000 (09:50 +0800)
committerJoerg Roedel <jroedel@suse.de>
Wed, 19 May 2021 06:51:02 +0000 (08:51 +0200)
commit1a590a1c8bf46bf80ea12b657ca44c345531ac80
treef125a4f935df8b6c8d6a55f44eb879754612abdd
parent382d91fc0f4f1b13f8a0dcbf7145f4f175b71a18
iommu/vt-d: Check for allocation failure in aux_detach_device()

In current kernels small allocations never fail, but checking for
allocation failure is the correct thing to do.

Fixes: 18abda7a2d55 ("iommu/vt-d: Fix general protection fault in aux_detach_device()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/YJuobKuSn81dOPLd@mwanda
Link: https://lore.kernel.org/r/20210519015027.108468-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c