Michal Suchanek 2cb43ef1c2 usb: ether: Fix error handling in usb_ether_init
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>
2022-10-17 21:17:12 -06:00
..
2022-09-29 16:07:57 -04:00
2022-07-08 17:57:33 -04:00
2022-10-12 11:11:19 -04:00
2020-05-18 21:19:18 -04:00