diff options
author | Michal Suchanek | 2022-10-12 21:57:54 +0200 |
---|---|---|
committer | Simon Glass | 2022-10-17 21:17:12 -0600 |
commit | 2cb43ef1c22302820061d4d11ddce85872e993e1 (patch) | |
tree | 2989e9d64589c76404fec6e225a17d99987a8dac /common | |
parent | 28a22cd9a482b947b21646ae595e3284cdea3002 (diff) |
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>
Diffstat (limited to 'common')
0 files changed, 0 insertions, 0 deletions