]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
iommu/amd: Drop incorrect NULL check for iommu in alloc_irq_table()
authorRakuram Eswaran <rakuram.e96@gmail.com>
Mon, 22 Dec 2025 17:10:08 +0000 (22:40 +0530)
committerJoerg Roedel <joerg.roedel@amd.com>
Sat, 10 Jan 2026 10:17:43 +0000 (11:17 +0100)
commit2e666595651ba02128b13e9029d5248cfc2fb702
tree627a7274c0409bc96391a8c5cb1478728461fe7b
parentd2a0cac10597068567d336e85fa3cbdbe8ca62bf
iommu/amd: Drop incorrect NULL check for iommu in alloc_irq_table()

alloc_irq_table() contains a conditional check for a NULL iommu pointer
when computing the NUMA node, but the function dereferences iommu
in multiple places afterwards.

All callers ensure that a valid iommu pointer is passed in, and a NULL
iommu is not expected by the current callers. Remove the incorrect
NULL check to make the assumptions consistent and address the Smatch
warning.

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: Rakuram Eswaran <rakuram.e96@gmail.com>
Reviewed-by: Ankit Soni <Ankit.Soni@amd.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd/iommu.c