linux/arch/x86/pci
Samasth Norway Ananda dbc3171194 x86/PCI: Check pcie_find_root_port() return for NULL
If pcie_find_root_port() is unable to locate a Root Port, it will return
NULL. Check the pointer for NULL before dereferencing it.

This particular case is in a quirk for devices that are always below a Root
Port, so this won't avoid a problem and doesn't need to be backported, but
check as a matter of style and to prevent copy/paste mistakes.

Link: https://lore.kernel.org/r/20240812202659.1649121-1-samasth.norway.ananda@oracle.com
Signed-off-by: Samasth Norway Ananda <samasth.norway.ananda@oracle.com>
[bhelgaas: drop Fixes: and explain why there's no problem in this case]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
2024-08-21 15:28:08 -05:00
..
acpi.c
amd_bus.c
broadcom_bus.c
bus_numa.c
bus_numa.h
ce4100.c x86/pci/ce4100: Remove unused 'struct sim_reg_op' 2024-05-08 09:17:17 +02:00
common.c
direct.c
early.c
fixup.c x86/PCI: Check pcie_find_root_port() return for NULL 2024-08-21 15:28:08 -05:00
i386.c
init.c
intel_mid_pci.c - Flip the logic to add feature names to /proc/cpuinfo to having to 2024-07-15 20:25:16 -07:00
irq.c
legacy.c
Makefile
mmconfig_32.c
mmconfig_64.c
mmconfig-shared.c x86/pci: Skip early E820 check for ECAM region 2024-05-16 14:35:08 -05:00
numachip.c
olpc.c x86/pci: Remove OLPC dead code 2024-05-03 17:09:44 -05:00
pcbios.c
sta2x11-fixup.c
xen.c x86/pci/xen: Fix PCIBIOS_* return code handling 2024-06-24 19:21:25 +02:00