diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2024-09-19 14:25:34 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2024-09-19 14:25:34 -0500 |
commit | 5dc07a20ac1c6882e191f821f9c75edde958224d (patch) | |
tree | e8621cd15f2332ac2836981106f12fa877cb0ac1 /arch | |
parent | ca5c65687e3e0370623e9e5d4e1a2aab8ebe20fd (diff) | |
parent | 5c7bdac783be8dcba1427460e7971445f839a5e2 (diff) |
Merge branch 'pci/misc'
- Check pcie_find_root_port() return in x86 fixups to avoid NULL pointer
dereferences (Samasth Norway Ananda)
- Make pci_bus_type constant (Kunwu Chan)
- Remove unused declarations of __pci_pme_wakeup() and pci_vpd_release()
(Yue Haibing)
- Remove any leftover .*.cmd files with make clean (zhang jiao)
* pci/misc:
PCI: Fix typos
PCI/VPD: Remove pci_vpd_release() unused declarations
PCI/PM: Remove __pci_pme_wakeup() unused declarations
PCI: Make pci_bus_type constant
x86/PCI: Check pcie_find_root_port() return for NULL
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/pci/fixup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c index b33afb240601..98a9bb92d75c 100644 --- a/arch/x86/pci/fixup.c +++ b/arch/x86/pci/fixup.c @@ -980,7 +980,7 @@ static void amd_rp_pme_suspend(struct pci_dev *dev) return; rp = pcie_find_root_port(dev); - if (!rp->pm_cap) + if (!rp || !rp->pm_cap) return; rp->pme_support &= ~((PCI_PM_CAP_PME_D3hot|PCI_PM_CAP_PME_D3cold) >> @@ -994,7 +994,7 @@ static void amd_rp_pme_resume(struct pci_dev *dev) u16 pmc; rp = pcie_find_root_port(dev); - if (!rp->pm_cap) + if (!rp || !rp->pm_cap) return; pci_read_config_word(rp, rp->pm_cap + PCI_PM_PMC, &pmc); |