[PATCH] am33xx: ignore return value from usb_ether_init()

Michal Suchánek msuchanek at suse.de
Thu Aug 31 12:15:11 CEST 2023


Hello,

On Wed, Aug 30, 2023 at 10:49:50PM -0400, Trevor Woerner wrote:
> In 2cb43ef1c223 ("usb: ether: Fix error handling in usb_ether_init") the error
> handling of usb_ether_init() was changed. Not a single other call site of this
> function checks its return value, therefore follow suit in the am33xx code.

then there is the question what point is there in having a return value
in this function at all.

Anyway, it's fine to not check the return value in the caller if there
is no use for the error.

Reviewed-by: Michal Suchánek <msuchanek at suse.de>

> 
> Do not cause the boot to halt if the usb gadget ethernet initialization fails:
> 
> 	initcall sequence 9ffdbd84 failed at call 808024b9 (err=-19)
> 	### ERROR ### Please RESET the board ###
> 
> Signed-off-by: Trevor Woerner <twoerner at gmail.com>
> ---
>  arch/arm/mach-omap2/am33xx/board.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
> index ecc0a592e993..8f772310a1a7 100644
> --- a/arch/arm/mach-omap2/am33xx/board.c
> +++ b/arch/arm/mach-omap2/am33xx/board.c
> @@ -270,11 +270,7 @@ int arch_misc_init(void)
>  		return ret;
>  
>  #if defined(CONFIG_DM_ETH) && defined(CONFIG_USB_ETHER)
> -	ret = usb_ether_init();
> -	if (ret) {
> -		pr_err("USB ether init failed\n");
> -		return ret;
> -	}
> +	usb_ether_init();
>  #endif
>  
>  	return 0;
> -- 
> 2.41.0.327.gaa9166bcc0ba
> 


More information about the U-Boot mailing list