Message ID | 20241108094255.2133-1-rex.nie@jaguarmicro.com (mailing list archive) |
---|---|
State | New |
Headers | show
Received: from HK3PR03CU002.outbound.protection.outlook.com (mail-eastasiaazon11021097.outbound.protection.outlook.com [52.101.129.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7D2219259F; Fri, 8 Nov 2024 09:43:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.129.97 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731059014; cv=fail; b=GJ93701S11pXVXEn/QnSvATeWvU+p+92aX546RMmrJhDd+sIEIkqXH2NJgFRJT7SjTgn8M+S7qYvFqum2XjAcM09ahMaWz3gU6nEaFEZsJbxrZwy9SPR47ByUzBCBSuwZuhrpLcR+PCA04zUyqiGY+9AH8t1Hc45cIj/nvoG8u0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731059014; c=relaxed/simple; bh=58oMrU8k7+lMiUYFm2l4X8ULOOv0bt7+DT7rM5/Wgks=; h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=LClJs2YHXLfLkSYLaMV4EyfCaynuvuekPDg5oyM/2Cci/jv872jFCjBAFfs3kRNGbyhp9njQBOrckvdQESn5FGHT9P+bis85lWO12Pn8LYca/VVCzPResYP6mneeOh6i6azCYTDHhs7bv2YOGo3WZ3RgPk02yuDTenzJOP7rYWU= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=jaguarmicro.com; spf=pass smtp.mailfrom=jaguarmicro.com; dkim=pass (2048-bit key) header.d=jaguarmicro.com header.i=@jaguarmicro.com header.b=RGO7uzB9; arc=fail smtp.client-ip=52.101.129.97 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=jaguarmicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jaguarmicro.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=jaguarmicro.com header.i=@jaguarmicro.com header.b="RGO7uzB9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NpnM2nJbBY7hMOR3qt+2sBV23hha9jO529jO4Iz1kr/r465mk3dsrFpdNKKz8iHRBGFyzQFffXuTdl2cWuIcplHVMVPLAox4gBTRwoynMR+73VDm9CwHpaBjTf63YVT0f2Kj84KqPfeQFfbMal4ntA9W4LENoOY1tYU1wK/tr31oeDRWcnMMrcWJj0x1UFbrZTtCjurizibU3XKCI5d4AMDyP2mXyAajSqk0ZL8e+ccwPheTzTrTuCcSl85iphICt/owwUmh96rKVUujafHZVqDL2TPxh+Gv9UWVwQCysqpgEbWFCWOjowdZnJo4lWSpn9lm1iYWBB3EU2M0YRMAZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=l43zYyZTj1cDtEQYDefaWyfOSzDF7u7bOiidmzzcZ0E=; b=v/2LHB48d+7hPm6a/nS5T3HErjjhoDofvWAWEtPgIbd+x/pWbhLhPgAEJvsyCwtkXX2frQq/z6mlhjxC16DjKfcUSxW/lq4w7v6KI8IHaHyHg2n3GQUydfCp999PLhlh35wn2EB6nb3EMz2J3kw+WOfBEitOJabd24jucGcNA49+sa3p6x09G98G1nMhUCh5tp25mm6B2jKWnbzC9v5mi7F3crZfKJBnRHn8hZ6WC5IZUy0iu9JCmIQ98HbQmthlevx1mdrJqQWJ61sSr87qfeXnX0zBLEcAlHbYGhRv5F3ffoQj2HS1ssS3USeEk9I6UneuHE3Jr/ZTieA4vIWc5Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=jaguarmicro.com; dmarc=pass action=none header.from=jaguarmicro.com; dkim=pass header.d=jaguarmicro.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jaguarmicro.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l43zYyZTj1cDtEQYDefaWyfOSzDF7u7bOiidmzzcZ0E=; b=RGO7uzB9xUKn4Kw7Df69IE+J4lXNxrMnnjcgG5OvfcwsuNlOfbXF4I4Ju4Cw2H+NFu8bE5eM/nEBEfsUxSmLeQrtZMSl8sxmcL9JHTRCjnPrf10mLwhDLbwvC5YatWAYZxkPTu+VqEekEgENF+aGncnnm+T8nxeCRsp3hkAv6xTPF3Vm3h/FPZxC3X/MAzZkxrIR6F7wK2P4iXY4dpj7CW2BRmMHewFrBHeLuqs00W5IHtp7wOtT1pnvWmz1rJeA4d2j9CeyQkh/6wNNlJwgi2XV82wjU7TuqnhHnBHl6/QqmPn53o4Tai7WAE2uYbDJyvM5I2hdlZ1pBWQ9S68sfw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=jaguarmicro.com; Received: from KL1PR0601MB5773.apcprd06.prod.outlook.com (2603:1096:820:b1::13) by TYUPR06MB6121.apcprd06.prod.outlook.com (2603:1096:400:351::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.16; Fri, 8 Nov 2024 09:43:25 +0000 Received: from KL1PR0601MB5773.apcprd06.prod.outlook.com ([fe80::b56a:3ef:aa9d:c82]) by KL1PR0601MB5773.apcprd06.prod.outlook.com ([fe80::b56a:3ef:aa9d:c82%4]) with mapi id 15.20.8137.018; Fri, 8 Nov 2024 09:43:25 +0000 From: Rex Nie <rex.nie@jaguarmicro.com> To: gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, angus.chen@jaguarmicro.com, stable@vger.kernel.org, Rex Nie <rex.nie@jaguarmicro.com> Subject: [PATCH] USB: core: remove dead code in do_proc_bulk() Date: Fri, 8 Nov 2024 17:42:55 +0800 Message-Id: <20241108094255.2133-1-rex.nie@jaguarmicro.com> X-Mailer: git-send-email 2.39.0.windows.2 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI1PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:1f6::14) To KL1PR0601MB5773.apcprd06.prod.outlook.com (2603:1096:820:b1::13) Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: <linux-usb.vger.kernel.org> List-Subscribe: <mailto:linux-usb+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-usb+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: KL1PR0601MB5773:EE_|TYUPR06MB6121:EE_ X-MS-Office365-Filtering-Correlation-Id: de7ba735-2059-42e2-9250-08dcffd9ca4e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|52116014|38350700014; X-Microsoft-Antispam-Message-Info: yD/SFXW+/TURzNbhYpMJ/LYgBKFHEMYH+I4lxWD52z4WpfjcHvK0GwQWO5wkZdhFjL4GFUpEghLnYLpKsteDce1KJdHWVzRmt22kYoVMIK9e36aFm8GodMpGO/3DE1OTlsLlHrV5PyHGpYiM46XBRyq9Zv1U0Su5bYpVIXnLzLVjqYj1KA9Nam+P2gRxq9hNjUm8wLwK6GkyTUQrcM2nS4zUHkbUQLZOgiP6qdnFv0BH2XwSchcR2nlZSTMDglQPGkeTFguhn3NPSUg4CKW6m8F1GhKjlptDaTbz5G7FAPiZhyJmnZuLKcz915Nwlna1MjcOSjElA12hZqiePpVy8e6T+0tr0gIog0YcucOXMbjKBEhVevpLfdp49ICxQlHb03RfL61cHOM9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773.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(52116014)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: GI7Pa1jhhotAZ+bSjSDam9OL8sp72ojSrfIIXPA+hSUuLdqKn//kTODq4gfpFwAoMrlWjV0iPJb8cy3i5aAUaQQ/juFo2TILz+T/I74Cvph5TLdTk50CKzYB9ucKqxVUcQwVKrSWzRg/PXu3GBl2BQIm3GtyKecoMdCp9V3dU3hCmjL9t20s/+EC3FHcldHvK4sCl+gwXi929sKkekMi2IKjEZc9fhEX3cdTk5rWBOHfCMkCWL+sd/4zc9L2DR36pLoLI4xsx4QNqYyZ/336tysOzVQmdlz6k9Nru8OiwgEV2BS5PWGjnN4Ma6BLeu91aARzkIRMSIIbWC95MHazECoQlHWY6CUarAhojW1Xl9UdQD09mCsc2kFRU5Q++jsZUa4erzMlYt1x/JgDe9SM3R6YtSDH9kDKa5IbORtx8ESo4n6Bp4RQiTugWCxAKj89GCvJjLW9v4kIcnofH8UXGDtkHARYaHymvRwmLgHitgCXXgX7uR4BDxS1yHIDLleh7D8FzDY9aox7/NcH9JB+64jcyvGHB6Xx1KcXCNLr0tUvLW+YLh3mOfOGZ4jE9+k1FhDWqJnDdV4OSvmFEgbnxDzfRO/6M9Q9fR1tV0jCd7Evdj1wRG0eN96EIUbiP94Vw2LKraCKQWotu+li26bUeW9H2iTRjQWtSgbT4IUKAicqqqOzC+PVIj38Coe3UyvHOnEctHLr2TqrhgSIdaBwMCvslE4bjeKfJYMTAsD+sudsqinIjB3yj43tvVNf3keNU0RraIq0qLaNs3+XAjrCMI4hmZ47qpiAccrZeXmi5qq/IKom3DIeXYUYoda1V+k/KhE+Zbv7KrWt2tWVoubX0/j7gfR7s3Rca5dnhSRLmTiDtXrhG4n52+SLfrGEGKIFxana3Fw1H1Pgf5hVs43HAC70OmEfRe5bWFUyQ3GkidhDpjFoDk4SZuvvJkPD7WapslTrxmXLVqmEojVKYiJO7Fn9pKI2HJZUs0CFJVjaJ6K8bABL744QgcETdh8KT8SpKYzI/4BDbc8HZbVNj5i9tsaNnP/Pkq3aU6C3Y78nmSnah9ArepbJC/HNFVkGpnrKd748lxrQTWVL0ISiqSssiAScUy8LMGRlDFC5mqZ+fDhiPj36q6OPUVlAp8o/DdaFrQUcO+fu+HlugSLdsW6l9eiFHggeoi465lKoZLxWp/8dU4THel2bSJwpuArt5GMuZAyDH4Ze9GWdM9kTtjLQbG9N8jhzOR5FZvq1b8tK44AmJAId3Ee7GEuioczYr5nR9atbO0eAfm9qAV4/i5Mu/fw00l/FXwWwv4ARtqIeKBJ5NRTVHnDanqSTRHYW2lm5b1SZlWKGW53nG9I7PaO4k36C9v7vsxFTsf765e1qLW3nKfQalGgvQjAj22z07W95b41IdXAdN13SeqUGQJ7Oytjl9+q25wemGPpM+XoMWTasaH0w83arSC1yw6GNc88P8qFWpdh7f1DOBSeFaCS+3L0ZE9IcT5cJpDnpA6ILADcJdvE9/tstOrH7oYMhUJKF8jOEI3S/z7j3KQULrcI1LPGWpxs7f3cyiPICJ0zS8OKudnJHJ18boQufatbyONGLB0EPIoZ5GNrd0DXJgrxcbg== X-OriginatorOrg: jaguarmicro.com X-MS-Exchange-CrossTenant-Network-Message-Id: de7ba735-2059-42e2-9250-08dcffd9ca4e X-MS-Exchange-CrossTenant-AuthSource: KL1PR0601MB5773.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Nov 2024 09:43:24.9456 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 1e45a5c2-d3e1-46b3-a0e6-c5ebf6d8ba7b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8rCBXEf2pb1DaqjV6m9vsotVJ8eb/gIzDXHiLZGqVBsa0IsJY6mEQsHG7/vh8eBBIvz6IktNbHTOExzENk32KA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR06MB6121 |
Series |
USB: core: remove dead code in do_proc_bulk()
|
expand
|
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 3beb6a862e80..712e290bab04 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1295,7 +1295,7 @@ static int do_proc_bulk(struct usb_dev_state *ps, return ret; len1 = bulk->len; - if (len1 < 0 || len1 >= (INT_MAX - sizeof(struct urb))) + if (len1 >= (INT_MAX - sizeof(struct urb))) return -EINVAL; if (bulk->ep & USB_DIR_IN)
Since len1 is unsigned int, len1 < 0 always false. Remove it keep code simple. Signed-off-by: Rex Nie <rex.nie@jaguarmicro.com> --- drivers/usb/core/devio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)