lkml.org 
[lkml]   [2021]   [Feb]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] Input: i8042: Remove unneeded variable
Date
From: Junlin Yang <yangjunlin@yulong.com>

The variable "delay" is initialized to zero and then returned.
So remove the delay variable and return zero.

Generated by:scripts/coccinelle/misc/returnvar.cocci

Signed-off-by: Junlin Yang <yangjunlin@yulong.com>
---
drivers/input/serio/i8042.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index abae23a..145bda1 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -1126,7 +1126,6 @@ static void i8042_controller_reset(bool s2r_wants_reset)

static long i8042_panic_blink(int state)
{
- long delay = 0;
char led;

led = (state) ? 0x01 | 0x04 : 0;
@@ -1142,7 +1141,7 @@ static long i8042_panic_blink(int state)
dbg("%02x -> i8042 (panic blink)\n", led);
i8042_write_data(led);
DELAY;
- return delay;
+ return 0;
}

#undef DELAY
--
1.9.1

\
 
 \ /
  Last update: 2021-02-25 14:53    [W:0.029 / U:1.616 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site