linux/drivers/iommu/amd
Vasant Hegde a807e4f4f6 iommu/amd: Fix error path in amd_iommu_probe_device()
[ Upstream commit 3222b6de51 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2026-01-30 10:32:17 +01:00
..
amd_iommu.h iommu/amd: Refactor AMD IOMMU debugfs initial setup 2025-07-15 11:41:52 +01:00
amd_iommu_types.h Merge branches 'apple/dart', 'ti/omap', 'riscv', 'intel/vt-d' and 'amd/amd-vi' into next 2025-09-26 10:03:33 +02:00
debugfs.c iommu/amd: Fix potential out-of-bounds read in iommu_mmio_show 2025-12-18 14:02:49 +01:00
init.c iommu/amd: Fix pci_segment memleak in alloc_pci_segment() 2026-01-08 10:16:55 +01:00
io_pgtable.c iommu/amd/pgtbl: Fix possible race while increase page table level 2025-09-19 09:39:40 +02:00
io_pgtable_v2.c iommu/pages: Remove iommu_alloc_page_node() 2025-04-17 16:22:51 +02:00
iommu.c iommu/amd: Fix error path in amd_iommu_probe_device() 2026-01-30 10:32:17 +01:00
Kconfig iommu/amd: Convert to msi_create_parent_irq_domain() helper 2025-07-04 10:28:10 +02:00
Makefile iommu: make inclusion of amd directory conditional 2025-05-16 08:46:46 +02: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