[PATCH v4 09/21] usb: ether: Fix error handling in usb_ether_init
Simon Glass
sjg at chromium.org
Thu Sep 29 12:00:33 CEST 2022
On Sun, 25 Sept 2022 at 02:30, Michal Suchanek <msuchanek at suse.de> wrote:
>
> The code checks the return value from uclass_first_device as well as
> that the device exists but it passes on the return value which may be
> zero if there are no gadget devices. Just check that a device was
> returned and return -ENODEV otherwise.
>
> Also remove the dev variable which is not really used for anything.
>
> Signed-off-by: Michal Suchanek <msuchanek at suse.de>
> ---
> drivers/usb/gadget/ether.c | 11 +++++------
> 1 file changed, 5 insertions(+), 6 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list