Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp5458820pxu; Tue, 22 Dec 2020 18:42:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJysoryP6xNDVS8qEGJhaf+OwNYF0E5mvFgGebOyar5zCFEgQd3OG4w1yEWR5YrCxwvID+RJ X-Received: by 2002:a17:906:7fcd:: with SMTP id r13mr22762936ejs.242.1608691329400; Tue, 22 Dec 2020 18:42:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1608691329; cv=none; d=google.com; s=arc-20160816; b=ZXY2UDIvv2XURyopKTbBNec+2gI5v2sn/NBjksTxShSFiI59cb1AjXysv+XlbujAPQ Fq7bqtzg/xwP/uA4Rr88pS9Dz4v8zoIKpS/MWO3zeVj3blZIEfll7BjGfFYxwv5CkOjV G+BQmq+7ocA8SaLn+vdSWSwslmzzy/GPy6TjcbVkVG+v86PkJ9hRCfaLuj6RUiCWRzgK Mt7D/wqYu0Z3Ut32+DgH5bf9GiEor0oBLO5hXi3EQyqylzWIN0Jk96tQ/WxcnfguoDJC N+R+0JkTVi4ykk8iea7cvikhRKX32EdzUkwQKqKmI7nMZa92J68Pnygrb+zxBNvo7YeK qefg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZbuABAWuNKxHVQrCe6f3MX88ANRsWbH5zGxGebWnJcU=; b=L2TnV4yP1JsG4+VvNaWrYxokAVfLFTJ/d1H/kFwofZJ/ErRgzEWhcFvRMOg4wShlVQ ZQWDTbSS6e29aSdbadhrgqH/sxPrSMn2THaTOCJJF/N7/WIVS9bQfFhVpVE7xlulqsn4 XbyG0XGLoEwYqCd8LLIktJSbxxtELgmAiq5FKuKQY2b9QH1tM7zK7mPhWrhkd3WRrGPL lVCIYitneXjE7XARUJLGasUgFwZjmIJZIKNWrkXYFyV2LmGz3D4qcEvs4jXF7s6+LOKj WtubMR1DWoO/LRE34tA7B8QlmFX+2K6Js6fsMOwl+Ld3C6g7sLdTISELktoDEuKVbCUq ArRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FCV1uy1t; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h5si6120837ejg.195.2020.12.22.18.41.47; Tue, 22 Dec 2020 18:42:09 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FCV1uy1t; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730092AbgLWClm (ORCPT + 99 others); Tue, 22 Dec 2020 21:41:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:49956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729973AbgLWCXX (ORCPT ); Tue, 22 Dec 2020 21:23:23 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id ED10723137; Wed, 23 Dec 2020 02:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1608690183; bh=gRH/DzjNbL1Co5o8P1LZJKyOjSjpo/Al9L+y3JPk/FM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FCV1uy1tVcBLDbnWzvm5HETecuuK/q/O7/bFKd2ZRhjblCm/JKTzWIduwL5gZCK8/ bhrKQS55TCGszi+ULYm1+nHbV3gCwG3zTez/4qyCJ7N3CByeDpUVk6bAhk8ypEYBPv M8ywubSMXH3cO6BuytxmYu733a0iyShWvsLDzf+YitBWwMt8Yo722DDnPt6XydsSWd xKad3/KDYUO1q0z7eF168WCKUtvUJtnqrHXX/pYq+6J0BXPgQImO0Jf4n+8lyM1dTo d5uyGJvp5usZnuXe5GJbjRMCTLXt1kssQPGvNpr/Da+zTABrs/0zQiUCvwZKdaCpZ4 kFjfCudc4y9+A== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Zhang Qilong , Greg Kroah-Hartman , Sasha Levin , devel@driverdev.osuosl.org Subject: [PATCH AUTOSEL 4.14 08/66] staging: rtl8192u: fix wrong judgement in rtl8192_rx_isr Date: Tue, 22 Dec 2020 21:21:54 -0500 Message-Id: <20201223022253.2793452-8-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201223022253.2793452-1-sashal@kernel.org> References: <20201223022253.2793452-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Zhang Qilong [ Upstream commit 071dc1787a2f8bb636f864c1f306280deea3b1d5 ] The 'EPERM' cannot appear in the previous path, we should use '-EPERM' to check it. For example: Call trace: ->rtl8192_rx_isr ->usb_submit_urb ->usb_hcd_submit_urb ->rh_urb_enqueue ->rh_queue_status ->usb_hcd_link_urb_to_ep Signed-off-by: Zhang Qilong Link: https://lore.kernel.org/r/20201028122648.47959-1-zhangqilong3@huawei.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/staging/rtl8192u/r8192U_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index b5941ae410d9a..fbeee8654781d 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -967,7 +967,7 @@ static void rtl8192_rx_isr(struct urb *urb) urb->context = skb; skb_queue_tail(&priv->rx_queue, skb); err = usb_submit_urb(urb, GFP_ATOMIC); - if (err && err != EPERM) + if (err && err != -EPERM) netdev_err(dev, "can not submit rxurb, err is %x, URB status is %x\n", err, urb->status); -- 2.27.0