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
..
Makefile
acpi.c x86/pci: Add MCFG debug logging 2023-12-05 10:56:39 -06:00
amd_bus.c range.h: Move resource API and constant to respective files 2023-08-18 10:19:00 -07:00
broadcom_bus.c
bus_numa.c range.h: Move resource API and constant to respective files 2023-08-18 10:19:00 -07:00
bus_numa.h
ce4100.c x86/pci/ce4100: Remove unused 'struct sim_reg_op' 2024-05-08 09:17:17 +02:00
common.c x86/PCI: Add kernel cmdline options to use/ignore E820 reserved regions 2022-05-19 14:26:55 -05:00
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 x86/PCI: Use struct_size() in pirq_convert_irt_table() 2023-07-13 11:33:20 -05:00
legacy.c
mmconfig-shared.c x86/pci: Skip early E820 check for ECAM region 2024-05-16 14:35:08 -05:00
mmconfig_32.c x86/pci: Rename 'MMCONFIG' to 'ECAM', use pr_fmt 2023-12-05 10:56:46 -06:00
mmconfig_64.c x86/pci: Reorder pci_mmcfg_arch_map() definition before calls 2023-12-05 10:57:03 -06:00
numachip.c
olpc.c x86/pci: Remove OLPC dead code 2024-05-03 17:09:44 -05:00
pcbios.c x86/pci: Clean up open-coded PCIBIOS return code mangling 2023-12-01 16:50:59 -06:00
sta2x11-fixup.c x86: sta2x11: include header for sta2x11_get_instance() prototype 2023-12-10 17:21:43 -08:00
xen.c x86/pci/xen: Fix PCIBIOS_* return code handling 2024-06-24 19:21:25 +02:00