mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-02 09:46:37 +03:00
board: sandbox: Improve extension board scan implementation
Enhance the extension board scanning code in sandbox with better error handling and code organization. Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Tom Rini
parent
53e14e9c0c
commit
37c6cdb053
@@ -113,11 +113,15 @@ int ft_board_setup(void *fdt, struct bd_info *bd)
|
||||
#ifdef CONFIG_CMD_EXTENSION
|
||||
int extension_board_scan(struct list_head *extension_list)
|
||||
{
|
||||
struct extension *extension;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
struct extension *extension;
|
||||
|
||||
extension = calloc(1, sizeof(struct extension));
|
||||
if (!extension)
|
||||
return -ENOMEM;
|
||||
|
||||
snprintf(extension->overlay, sizeof(extension->overlay), "overlay%d.dtbo", i);
|
||||
snprintf(extension->name, sizeof(extension->name), "extension board %d", i);
|
||||
snprintf(extension->owner, sizeof(extension->owner), "sandbox");
|
||||
|
||||
Reference in New Issue
Block a user