[PATCH] Input: Remove unneeded variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Junlin Yang <yangjunlin@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 drivers/input/input.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

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)
-- 
1.9.1




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux