Skip to content

Commit deb106b

Browse files
Colin Ian Kingdtor
authored andcommitted
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>
1 parent 0de4502 commit deb106b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/input/mouse/cyapa.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ static ssize_t cyapa_show_suspend_scanrate(struct device *dev,
740740
char *buf)
741741
{
742742
struct cyapa *cyapa = dev_get_drvdata(dev);
743-
u8 pwr_cmd = cyapa->suspend_power_mode;
743+
u8 pwr_cmd;
744744
u16 sleep_time;
745745
int len;
746746
int error;

0 commit comments

Comments
 (0)