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: <20210225091830.545-1-angkery@163.com>
Date:   Thu, 25 Feb 2021 17:18:30 +0800
From:   angkery <angkery@....com>
To:     dmitry.torokhov@...il.com
Cc:     linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
        Junlin Yang <yangjunlin@...ong.com>
Subject: [PATCH] Input: Remove unneeded variable

From: Junlin Yang <yangjunlin@...ong.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@...ong.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ