From patchwork Wed Nov 29 20:43:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Shtylyov X-Patchwork-Id: 748465 Authentication-Results: smtp.subspace.kernel.org; dkim=none Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D5A7010DB for ; Wed, 29 Nov 2023 12:44:00 -0800 (PST) Received: from [192.168.1.103] (178.176.78.44) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Wed, 29 Nov 2023 23:43:50 +0300 To: Alan Stern , Greg Kroah-Hartman , , From: Sergey Shtylyov Subject: [PATCH] usb: storage: freecom: drop useless assignment in init_freecom() Organization: Open Mobile Platform Message-ID: <4d3fb70f-bf2f-96cc-a8fb-1ef658a24920@omp.ru> Date: Wed, 29 Nov 2023 23:43:50 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Language: en-US X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.0.0, Database issued on: 11/29/2023 20:26:37 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 181714 [Nov 29 2023] X-KSE-AntiSpam-Info: Version: 6.0.0.2 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 5 0.3.5 98d108ddd984cca1d7e65e595eac546a62b0144b X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.78.44 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2; omp.ru:7.1.1; d41d8cd98f00b204e9800998ecf8427e.com:7.1.1 X-KSE-AntiSpam-Info: ApMailHostAddress: 178.176.78.44 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 11/29/2023 20:30:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 11/29/2023 6:46:00 PM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Level: * In init_freecom(), the results of usb_stor_control_msg() calls are stored in the local variable and then printed out by usb_stor_dbg() (if enabled), except for the 1st call, the result of which is completely ignored. Drop the useless assignment. Found by Linux Verification Center (linuxtesting.org) with the Svace static analysis tool. Signed-off-by: Sergey Shtylyov --- This patch is against the 'usb-next' branch of Greg KH's 'usb.git' repo... drivers/usb/storage/freecom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: usb/drivers/usb/storage/freecom.c =================================================================== --- usb.orig/drivers/usb/storage/freecom.c +++ usb/drivers/usb/storage/freecom.c @@ -446,7 +446,7 @@ static int init_freecom(struct us_data * * all our packets. No need to allocate any extra buffer space. */ - result = usb_stor_control_msg(us, us->recv_ctrl_pipe, + usb_stor_control_msg(us, us->recv_ctrl_pipe, 0x4c, 0xc0, 0x4346, 0x0, buffer, 0x20, 3*HZ); buffer[32] = '\0'; usb_stor_dbg(us, "String returned from FC init is: %s\n", buffer);