]> www.infradead.org Git - users/dwmw2/linux.git/commit
PCI: al: Check IORESOURCE_BUS existence during probe
authorAleksandr Mishin <amishin@t-argos.ru>
Fri, 3 May 2024 12:57:05 +0000 (15:57 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 28 May 2024 16:14:24 +0000 (11:14 -0500)
commita9927c2cac6e9831361e43a14d91277818154e6a
treeb2edae1ca06f461c7b4b333ecec7e866cc3bf448
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
PCI: al: Check IORESOURCE_BUS existence during probe

If IORESOURCE_BUS is not provided in Device Tree it will be fabricated in
of_pci_parse_bus_range(), so NULL pointer dereference should not happen
here.

But that's hard to verify, so check for NULL anyway.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Link: https://lore.kernel.org/linux-pci/20240503125705.46055-1-amishin@t-argos.ru
Suggested-by: Bjorn Helgaas <helgaas@kernel.org>
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
[bhelgaas: commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/dwc/pcie-al.c