]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: Always have realloc_head in __assign_resources_sorted()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Mon, 16 Dec 2024 17:56:27 +0000 (19:56 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 18 Feb 2025 21:40:54 +0000 (15:40 -0600)
commitb3281eb5ded17f88d7d4fa5fb39a709c195e56c2
treef8f42956a84b8be3a157b5bb617b84847127f5e9
parent9caf4ea2fd022e3febb8f70421b7f87e9788852e
PCI: Always have realloc_head in __assign_resources_sorted()

Add a dummy list to always have a non-NULL realloc head in
__assign_resources_sorted() as it allows only checking list_empty().

In future, it would be good to ensure all callers provide a valid
realloc_head but that is relatively complex to do in practice and not
necessary for the subsequent optional resource handling fix.

Link: https://lore.kernel.org/r/20241216175632.4175-21-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Xiaochun Lee <lixc17@lenovo.com>
drivers/pci/setup-bus.c