Input: remove unneeded variable in input_inhibit_device()
authorChangcheng Deng <deng.changcheng@zte.com.cn>
Wed, 20 Apr 2022 20:55:07 +0000 (13:55 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 25 Apr 2022 01:24:59 +0000 (18:24 -0700)
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>
Link: https://lore.kernel.org/r/20220419064255.2563333-1-deng.changcheng@zte.com.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input.c

index 6428cda..0e7f3d0 100644 (file)
@@ -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)