Skip to content

Commit b175d27

Browse files
AlanSterngregkh
authored andcommitted
USB: legotower: fix logical error in recent commit
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]>
1 parent 3d41137 commit b175d27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/misc/legousbtower.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ static int tower_probe(struct usb_interface *interface, const struct usb_device_
797797
&get_version_reply,
798798
sizeof(get_version_reply),
799799
1000, GFP_KERNEL);
800-
if (!result) {
800+
if (result) {
801801
dev_err(idev, "get version request failed: %d\n", result);
802802
retval = result;
803803
goto error;

0 commit comments

Comments
 (0)