Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2872555pxu; Sat, 19 Dec 2020 04:57:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJzvtUfxvKTL3PSjmvQBReq3HLKS7TPSBXFimvEND9jNFRPJr3kADWHi1ctN4z5us9/gGZ+d X-Received: by 2002:a50:8e19:: with SMTP id 25mr6955407edw.263.1608382675350; Sat, 19 Dec 2020 04:57:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608382675; cv=none; d=google.com; s=arc-20160816; b=eyvVMpwCdL+TBOxCNIORWrSiMOnqX0ZCJL/c7u1km0dvo2yb+XtVcCvoIf4DNTeJMK HYMyfQXE+xe1D7Swpnrdq7gd8A+Gdke+nrS74o415rTVX1ty0uFfLU/o+wN8uU0Oys8U 7VdLHT0n+4ARx2tgJngZWOrZkdW/0/QYqnCiSXum0bPJEUMswMlxmcVuBRF/jj3tB8wE rxtiFubPBgDeijdp1E+NEmNXd4EulPdpSbJ4U3ra8a5ZgK+JxWW54tWoho49WaWnWX41 O1RTM95fBT0G/PwkCv+WaBUvClO1v27XI/csvki7G5tsWo+Tjl3bVQGOcAVS5cTfgV3d 9lsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=Yry2aJdPmu1tlharL6ct+16TIaYUwE3gBy5OYm+MGpU=; b=x3weHlGd71HQNTvMejVlEyxu+DRRTE/cZRmBAjXO8irNbrH6uyb87nmLPGiyib+GDW hOnbPYcUsE0A7XqBrWbY5HkPJhJmuUp6yf7sRtvmPYK6Dy2nzRFrj+oaZsgqDM+IpbVx XXWkPYsBT25ReH+cADbBSjjTnmePnQpRVtktDx1Dyjc/L4bhqzx8JUVGVcloprQGCcbx V9B3U1wuODYdsnf8GzKUhvB7My6cj356AhEWo0H6HdAeV6RLbhyIIe5EotI+YkW5VGdO uA3VCwCT8/iThWKpBR21/GmoZr+ETwf+kk+cqRnxGKU4EJxfR2bQPmiG4eqgQbLXEbfN AUzg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j16si5576361ejc.358.2020.12.19.04.57.32; Sat, 19 Dec 2020 04:57:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726876AbgLSM44 (ORCPT + 99 others); Sat, 19 Dec 2020 07:56:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:43568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726479AbgLSM44 (ORCPT ); Sat, 19 Dec 2020 07:56:56 -0500 From: Greg Kroah-Hartman Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Stern , syzbot+9be25235b7a69b24d117@syzkaller.appspotmail.com Subject: [PATCH 5.10 04/16] USB: legotower: fix logical error in recent commit Date: Sat, 19 Dec 2020 13:57:11 +0100 Message-Id: <20201219125339.283055949@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201219125339.066340030@linuxfoundation.org> References: <20201219125339.066340030@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alan Stern commit b175d273d4e4100b66e68f0675fef7a3c07a7957 upstream. Commit d9f0d82f06c6 ("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: syzbot+9be25235b7a69b24d117@syzkaller.appspotmail.com Signed-off-by: Alan Stern Link: https://lore.kernel.org/r/20201208163042.GD1298255@rowland.harvard.edu Fixes: d9f0d82f06c6 ("USB: legousbtower: use usb_control_msg_recv()") Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/misc/legousbtower.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c @@ -797,7 +797,7 @@ static int tower_probe(struct usb_interf &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;