Skip to content

Commit

Permalink
USB: legotower: fix logical error in recent commit
Browse files Browse the repository at this point in the history
Commit d9f0d82 ("USB: legousbtower: use usb_control_msg_recv()")
contained an elementary logical error.  The check of the return code
from the new usb_control_msg_recv() function was inverted.

Reported-and-tested-by: [email protected]
Signed-off-by: Alan Stern <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: d9f0d82 ("USB: legousbtower: use usb_control_msg_recv()")
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
AlanStern authored and gregkh committed Dec 8, 2020
1 parent 3d41137 commit b175d27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/misc/legousbtower.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ static int tower_probe(struct usb_interface *interface, const struct usb_device_
&get_version_reply,
sizeof(get_version_reply),
1000, GFP_KERNEL);
if (!result) {
if (result) {
dev_err(idev, "get version request failed: %d\n", result);
retval = result;
goto error;
Expand Down

0 comments on commit b175d27

Please sign in to comment.