diff mbox series

Input: Remove unneeded variable

Message ID 20210225091830.545-1-angkery@163.com (mailing list archive)
State New, archived
Headers show
Series Input: Remove unneeded variable | expand

Commit Message

Junlin Yang Feb. 25, 2021, 9:18 a.m. UTC
From: Junlin Yang <yangjunlin@yulong.com>

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

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

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

Patch

diff --git a/drivers/input/input.c b/drivers/input/input.c
index ccaeb24..8cdc3fe 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1746,8 +1746,6 @@  void input_reset_device(struct input_dev *dev)
 
 static int input_inhibit_device(struct input_dev *dev)
 {
-	int ret = 0;
-
 	mutex_lock(&dev->mutex);
 
 	if (dev->inhibited)
@@ -1769,7 +1767,7 @@  static int input_inhibit_device(struct input_dev *dev)
 
 out:
 	mutex_unlock(&dev->mutex);
-	return ret;
+	return 0;
 }
 
 static int input_uninhibit_device(struct input_dev *dev)