[PATCH v13 1/9] eficonfig: menu-driven addition of UEFI boot option
Masahisa Kojima
masahisa.kojima at linaro.org
Thu Aug 25 05:17:40 CEST 2022
On Wed, 24 Aug 2022 at 23:19, Ilias Apalodimas
<ilias.apalodimas at linaro.org> wrote:
>
> 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.
Yes, I will fix it.
Thanks,
Masahisa Kojima
>
> > + 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