All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: Trevor Woerner <twoerner@gmail.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>,
	Simon Glass <sjg@chromium.org>, Bin Meng <bmeng.cn@gmail.com>
Subject: Re: [PATCH] am33xx: ignore return value from usb_ether_init()
Date: Thu, 31 Aug 2023 12:15:11 +0200	[thread overview]
Message-ID: <20230831101511.GD8826@kitsune.suse.cz> (raw)
In-Reply-To: <20230831024951.22599-1-twoerner@gmail.com>

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@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@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
> 

  reply	other threads:[~2023-08-31 10:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-31  2:49 [PATCH] am33xx: ignore return value from usb_ether_init() Trevor Woerner
2023-08-31 10:15 ` Michal Suchánek [this message]
2023-09-13 12:50   ` Trevor Woerner
2023-09-13 18:32     ` Tom Rini
2023-09-13 18:42       ` Trevor Woerner
2023-09-19 15:14 ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230831101511.GD8826@kitsune.suse.cz \
    --to=msuchanek@suse.de \
    --cc=bmeng.cn@gmail.com \
    --cc=sjg@chromium.org \
    --cc=twoerner@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.