aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichal Suchanek2022-10-12 21:57:54 +0200
committerSimon Glass2022-10-17 21:17:12 -0600
commit2cb43ef1c22302820061d4d11ddce85872e993e1 (patch)
tree2989e9d64589c76404fec6e225a17d99987a8dac /common
parent28a22cd9a482b947b21646ae595e3284cdea3002 (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