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
..
2021-07-06 10:38:03 -06:00
2020-05-18 21:19:23 -04:00
2021-09-30 09:08:16 -04:00
2020-05-18 21:19:23 -04:00
2018-05-07 09:34:12 -04:00
2020-05-18 21:19:23 -04:00
2018-05-07 09:34:12 -04:00
2022-04-22 10:35:14 +02:00
2015-05-29 12:41:04 +02:00
2021-01-31 14:08:56 +01:00
2018-05-07 09:34:12 -04:00
2021-01-31 14:08:56 +01:00
2020-05-18 21:19:23 -04:00
2019-04-21 10:26:52 +02:00
2020-11-22 13:18:20 +01:00
2022-09-26 01:49:36 +02:00
2022-03-14 12:31:12 +01:00
2021-03-03 04:12:46 +01:00
2018-05-07 09:34:12 -04:00
2022-07-07 09:29:08 -04:00
2022-10-17 21:17:12 -06:00
2022-09-18 10:26:33 +02:00
2022-01-28 10:21:51 -05:00
2018-05-07 09:34:12 -04:00
2022-10-10 18:08:18 +02:00
2020-09-01 14:47:43 +02:00
2021-09-17 12:10:44 -04:00
2022-09-29 16:07:57 -04:00
2021-01-31 14:08:56 +01:00
2018-05-18 13:17:30 +02:00
2020-05-18 21:19:23 -04:00
2021-01-31 14:08:56 +01:00
2022-07-08 17:57:33 -04:00
2022-10-12 11:11:19 -04:00
2022-10-10 18:08:18 +02:00
2022-05-23 09:33:10 -04:00
2011-02-19 20:32:37 +01:00
2020-05-18 21:19:18 -04:00
2018-05-07 09:34:12 -04:00
2020-05-18 21:19:18 -04:00
2021-01-31 14:08:56 +01:00
2021-01-31 14:08:56 +01:00