
17 Oct
2022
17 Oct
'22
11:29 p.m.
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@suse.de Reviewed-by: Simon Glass sjg@chromium.org --- drivers/usb/gadget/ether.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
Applied to u-boot-dm, thanks!