lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220829123942.268598-1-cui.jinpeng2@zte.com.cn>
Date:   Mon, 29 Aug 2022 12:39:42 +0000
From:   cgel.zte@...il.com
To:     djogorchock@...il.com, jikos@...nel.org,
        benjamin.tissoires@...hat.com
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        Jinpeng Cui <cui.jinpeng2@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] HID: nintendo: remove redundant variables ret

From: Jinpeng Cui <cui.jinpeng2@....com.cn>

Return value directly from __joycon_hid_send() instead of
getting value from redundant variable ret.

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@....com.cn>
---
 drivers/hid/hid-nintendo.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hid/hid-nintendo.c b/drivers/hid/hid-nintendo.c
index 6028af3c3aae..eee569998e02 100644
--- a/drivers/hid/hid-nintendo.c
+++ b/drivers/hid/hid-nintendo.c
@@ -1378,7 +1378,6 @@ static void joycon_parse_report(struct joycon_ctlr *ctlr,
 
 static int joycon_send_rumble_data(struct joycon_ctlr *ctlr)
 {
-	int ret;
 	unsigned long flags;
 	struct joycon_rumble_output rumble_output = { 0 };
 
@@ -1403,9 +1402,8 @@ static int joycon_send_rumble_data(struct joycon_ctlr *ctlr)
 
 	joycon_enforce_subcmd_rate(ctlr);
 
-	ret = __joycon_hid_send(ctlr->hdev, (u8 *)&rumble_output,
+	return __joycon_hid_send(ctlr->hdev, (u8 *)&rumble_output,
 				sizeof(rumble_output));
-	return ret;
 }
 
 static void joycon_rumble_worker(struct work_struct *work)
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ