Input: cyapa - remove redundant assignment to 'pwr_cmd'
authorColin Ian King <colin.king@canonical.com>
Thu, 18 Jan 2018 19:22:11 +0000 (11:22 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Thu, 18 Jan 2018 19:39:49 +0000 (11:39 -0800)
The variable pwr_cmd is being assigned to cyapa->suspend_power_mode
twice, once during the declaration and once after taking an
interruptible mutex lock.  Remove the redundant first assignment
since the value is never read and it is outside the mutex lock.

Cleans up clang warning:
drivers/input/mouse/cyapa.c:743:5: warning: Value stored to 'pwr_cmd'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/mouse/cyapa.c

index fd8865c65cafc8b22a5203047eeb40db2459b5a8..dfd3873513e4b5b635b492b83217b18f0ad96e01 100644 (file)
@@ -740,7 +740,7 @@ static ssize_t cyapa_show_suspend_scanrate(struct device *dev,
                                           char *buf)
 {
        struct cyapa *cyapa = dev_get_drvdata(dev);
-       u8 pwr_cmd = cyapa->suspend_power_mode;
+       u8 pwr_cmd;
        u16 sleep_time;
        int len;
        int error;