diff mbox series

Input: Remove unneeded variable

Message ID 20220419064255.2563333-1-deng.changcheng@zte.com.cn (mailing list archive)
State Accepted
Commit 0a112e7c681ca311b241c50a75d9206f301ca21c
Headers show
Series Input: Remove unneeded variable | expand

Commit Message

CGEL April 19, 2022, 6:42 a.m. UTC
From: Changcheng Deng <deng.changcheng@zte.com.cn>

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
---
 drivers/input/input.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Dmitry Torokhov April 20, 2022, 8:56 p.m. UTC | #1
Ov> HID-over-I2C devices might reset on their own. Any device configuration
> applied before the reset might be brought back to defaults so we need to
> reconfigure to make sure the driver state is consistent.
> 
> Add a reset callback to the hid driver structure.
> Issue it if the driver implements it and the device reset gets observed.
> 
> Signed-off-by: Angela Czubak <acz@semihalf.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/input/input.c b/drivers/input/input.c
index e5a668ce884d..1365c9dfb5f2 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -1793,8 +1793,6 @@  EXPORT_SYMBOL(input_reset_device);
 
 static int input_inhibit_device(struct input_dev *dev)
 {
-	int ret = 0;
-
 	mutex_lock(&dev->mutex);
 
 	if (dev->inhibited)
@@ -1816,7 +1814,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)