Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: cyapa - remove redundant assignment to 'pwr_cmd'

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>

authored by

Colin Ian King and committed by
Dmitry Torokhov
deb106be 0de45027

+1 -1
+1 -1
drivers/input/mouse/cyapa.c
··· 740 740 char *buf) 741 741 { 742 742 struct cyapa *cyapa = dev_get_drvdata(dev); 743 - u8 pwr_cmd = cyapa->suspend_power_mode; 743 + u8 pwr_cmd; 744 744 u16 sleep_time; 745 745 int len; 746 746 int error;