linux/drivers/iommu/amd
Vasant Hegde 3222b6de51 iommu/amd: Fix error path in amd_iommu_probe_device()
Currently, the error path of amd_iommu_probe_device() unconditionally
references dev_data, which may not be initialized if an early failure
occurs (like iommu_init_device() fails).

Move the out_err label to ensure the function exits immediately on
failure without accessing potentially uninitialized dev_data.

Fixes: 19e5cc156c ("iommu/amd: Enable support for up to 2K interrupts per function")
Cc: Rakuram Eswaran <rakuram.e96@gmail.com>
Cc: Jörg Rödel <joro@8bytes.org>
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202512191724.meqJENXe-lkp@intel.com/
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
History 2026-01-18 11:03:12 +01:00
..
amd_iommu.h amd/iommu: Make protection domain ID functions non-static 2025-12-19 11:23:49 +01:00
amd_iommu_types.h tsm for 6.19 2025-12-06 10:15:41 -08:00
debugfs.c iommu/amd: Fix potential out-of-bounds read in iommu_mmio_show 2025-11-04 11:06:00 +01:00
init.c amd/iommu: Make protection domain ID functions non-static 2025-12-19 11:23:49 +01:00
iommu.c iommu/amd: Fix error path in amd_iommu_probe_device() 2026-01-18 11:03:12 +01:00
Kconfig iommu/amd: Use the generic iommu page table 2025-11-05 09:08:56 +01:00
Makefile iommu/amd: Remove AMD io_pgtable support 2025-11-05 09:08:57 +01:00
pasid.c iommu/amd: Consolidate protection domain free code 2025-03-10 09:27:11 +01:00
ppr.c iommu/pages: Remove the order argument to iommu_free_pages() 2025-04-17 16:22:33 +02:00
quirks.c iommu/amd: Include PCI segment ID when initialize IOMMU 2022-07-07 09:37:51 +02:00