Re: [PATCH v2 2/2] PCI: of_property: Omit 'bus-range' property if no secondary bus

From: Manivannan Sadhasivam
Date: Tue Mar 18 2025 - 02:30:00 EST


On Tue, Mar 11, 2025 at 09:52:29PM +0800, Bo Sun wrote:
> The previous implementation of of_pci_add_properties() and
> of_pci_prop_bus_range() assumed that a valid secondary bus is always
> present, which can be problematic in cases where no bus numbers are
> assigned for a secondary bus. This patch introduces a check for a valid
> secondary bus and omits the 'bus-range' property if it is not available,
> preventing dereferencing the NULL pointer.
>

This definitely needs a Fixes tag and should be backported.

- Mani

--
மணிவண்ணன் சதாசிவம்