[PATCH] efi_loader: remove efi_delete_handle on loadfile2

Ilias Apalodimas ilias.apalodimas at linaro.org
Sun Oct 16 10:38:51 CEST 2022


Hi Heinrich, 

[...]

> > -void efi_initrd_deregister(void)
> > +efi_status_t efi_initrd_deregister(void)
> >   {
> > +	efi_status_t ret;
> > +
> >   	if (!efi_initrd_handle)
> > -		return;
> > +		return EFI_SUCCESS;
> > 
> > -	efi_delete_handle(efi_initrd_handle);
> > +	ret = efi_uninstall_multiple_protocol_interfaces(efi_initrd_handle,
> > +							 /* initramfs */
> > +							 &efi_guid_device_path,
> > +							 &dp_lf2_handle,
> > +							 /* LOAD_FILE2 */
> > +							 &efi_guid_load_file2_protocol,
> > +							 (void *)&efi_lf2_protocol,
> 
> The (void *) conversion is not needed.
> 
> > +							 NULL);
> 
> This will delete the handle if the called application has not installed
> additional protocols on the handle.
> 
> Except for the (void *) conversion

Fair enough.  This was a c/p from
efi_install_multiple_protocol_interfaces() so on v2 I've cleaned that up as
well

> 
> Reviewed-by: Heinrich Schuchardt <xypron.glpk at gmx.de>

Thanks!
/Ilias
> 
> >   	efi_initrd_handle = NULL;
> > +
> > +	return ret;
> >   }


More information about the U-Boot mailing list