From: Titouan Ameline de Cadeville Date: Fri, 1 May 2026 09:43:22 +0000 (+0200) Subject: firmware: google: Skip failing entries instead of aborting populate X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86e3bbc716332600e9e087f8a4889f4d9714a99c;p=thirdparty%2Flinux.git firmware: google: Skip failing entries instead of aborting populate coreboot_table_populate() registers devices one by one. If device_register() fails for one entry, the current code returns immediately, leaving previously registered devices orphaned on the coreboot bus with no cleanup path. Since coreboot table entries are independent of each other, a failure on one entry should not prevent the others from being registered. This mirrors the strategy used by of_platform_populate(), which skips individual failures rather than aborting. Move ptr_entry increment before device_register(), log a warning on failure, and continue the loop rather than aborting. Signed-off-by: Titouan Ameline de Cadeville Reviewed-by: Julius Werner Acked-by: Brian Norris Link: https://lore.kernel.org/r/20260501094322.123160-1-titouan.ameline@gmail.com Signed-off-by: Tzung-Bi Shih --- diff --git a/drivers/firmware/google/coreboot_table.c b/drivers/firmware/google/coreboot_table.c index 233939e548b44..83f7eedf0b3fb 100644 --- a/drivers/firmware/google/coreboot_table.c +++ b/drivers/firmware/google/coreboot_table.c @@ -155,13 +155,13 @@ static int coreboot_table_populate(struct device *dev, void *ptr, resource_size_ break; } + ptr_entry += entry->size; + ret = device_register(&device->dev); if (ret) { + dev_warn(dev, "failed to register coreboot device: %d\n", ret); put_device(&device->dev); - return ret; } - - ptr_entry += entry->size; } return 0;