Skip to content

Commit 05b8465

Browse files
Colin Ian Kingdtor
authored andcommitted
Input: elantech - remove redundant assignments to variable error
The variable error is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent d0ac707 commit 05b8465

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/input/mouse/elantech.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,7 +1897,7 @@ static bool elantech_use_host_notify(struct psmouse *psmouse,
18971897
int elantech_init_smbus(struct psmouse *psmouse)
18981898
{
18991899
struct elantech_device_info info;
1900-
int error = -EINVAL;
1900+
int error;
19011901

19021902
psmouse_reset(psmouse);
19031903

@@ -2015,7 +2015,7 @@ static int elantech_setup_ps2(struct psmouse *psmouse,
20152015
int elantech_init_ps2(struct psmouse *psmouse)
20162016
{
20172017
struct elantech_device_info info;
2018-
int error = -EINVAL;
2018+
int error;
20192019

20202020
psmouse_reset(psmouse);
20212021

@@ -2036,7 +2036,7 @@ int elantech_init_ps2(struct psmouse *psmouse)
20362036
int elantech_init(struct psmouse *psmouse)
20372037
{
20382038
struct elantech_device_info info;
2039-
int error = -EINVAL;
2039+
int error;
20402040

20412041
psmouse_reset(psmouse);
20422042

0 commit comments

Comments
 (0)