summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMichal Suchanek <[email protected]>2022-10-12 21:57:54 +0200
committerSimon Glass <[email protected]>2022-10-17 21:17:12 -0600
commit2cb43ef1c22302820061d4d11ddce85872e993e1 (patch)
tree2989e9d64589c76404fec6e225a17d99987a8dac /include/linux
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions