[PATCH v13 1/9] eficonfig: menu-driven addition of UEFI boot option

Ilias Apalodimas ilias.apalodimas at linaro.org
Wed Aug 24 16:19:24 CEST 2022


Kojima-san,

[...]

> +
> +/**
> + * eficonfig_init() - do required initialization for eficonfig command
> + *
> + * Return:	status code
> + */
> +static efi_status_t eficonfig_init(void)
> +{
> +	efi_status_t ret;


You need to initialize ret here to something.

> +	static bool init;
> +	struct efi_handler *handler;
> +
> +	if (!init) {
> +		ret = efi_search_protocol(efi_root, &efi_guid_text_input_protocol, &handler);
> +		if (ret != EFI_SUCCESS)
> +			return ret;
> +
> +		ret = efi_protocol_open(handler, (void **)&cin, efi_root, NULL,
> +					EFI_OPEN_PROTOCOL_GET_PROTOCOL);
> +		if (ret != EFI_SUCCESS)
> +			return ret;
> +	}

Because this code might never run

> +
> +	init = true;
> +
> +	return ret;
> +}
> +
> +static const struct eficonfig_item maintenance_menu_items[] = {
 
[...]


Regards
/Ilias


More information about the U-Boot mailing list