lkml.org 
[lkml]   [2022]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH linux-next] HID: nintendo: remove redundant variables ret
Date
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>

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

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.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
\
 
 \ /
  Last update: 2022-08-29 14:52    [W:0.026 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site