From 32d09be655465879fa4ca3f68102af778e69539e Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Wed, 3 Nov 2021 13:27:45 +0100 Subject: treewide: Replace bad uses of `find_resource` The `find_resource` function will never return null (will die instead). In cases where the existing code already accounts for null pointers, it is better to use `probe_resource` instead, which returns a null pointer instead of dying. Change-Id: I329efcb42a444b097794fde4f40acf5ececaea8c Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/58910 Tested-by: build bot (Jenkins) Reviewed-by: Werner Zeh Reviewed-by: Tim Wawrzynczak Reviewed-by: Lance Zhao --- src/mainboard/siemens/mc_apl1/mainboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mainboard') diff --git a/src/mainboard/siemens/mc_apl1/mainboard.c b/src/mainboard/siemens/mc_apl1/mainboard.c index 7ac8764b60..24e61dcf95 100644 --- a/src/mainboard/siemens/mc_apl1/mainboard.c +++ b/src/mainboard/siemens/mc_apl1/mainboard.c @@ -229,7 +229,7 @@ static void mainboard_final(void *chip_info) dev = pcidev_path_on_root(PCH_DEVFN_SDCARD); if (dev) { uint32_t reg; - struct resource *res = find_resource(dev, PCI_BASE_ADDRESS_0); + struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); if (!res) return; -- cgit v1.2.3