
29 Sep
2022
29 Sep
'22
noon
On Sun, 25 Sept 2022 at 02:30, Michal Suchanek msuchanek@suse.de wrote:
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
drivers/usb/gadget/ether.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org