Re: [PATCH v4] PCI: dwc: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs()

From: Krzysztof Wilczyński
Date: Fri May 17 2024 - 13:14:06 EST


Hello,

> If IORESOURCE_MEM is not provided in Device Tree due to any error,
> resource_list_first_type() will return NULL and
> pci_parse_request_of_pci_ranges() will just emit a warning.
> This will cause a NULL pointer dereference.
> Fix this bug by adding NULL return check.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.

Applied to controller/dwc, thank you!

[1/1] PCI: dwc: keystone: Fix NULL pointer dereference in case of DT error in ks_pcie_setup_rc_app_regs()
https://git.kernel.org/pci/pci/c/b1d4d63d52a7

Krzysztof