summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2020-07-07 03:38:16 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2020-07-07 03:53:33 +0300
commit05b8465025466f30300941a16d4bbf53c755c3f1 (patch)
treefebd2795d584e0e7e657f979819d470ff2d171a7 /drivers/input
parentd0ac7079d5fcaaaf3eb99c197a08ac1b399754f4 (diff)
downloadlinux-05b8465025466f30300941a16d4bbf53c755c3f1.tar.xz
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 <colin.king@canonical.com> Link: https://lore.kernel.org/r/20200603140431.131347-1-colin.king@canonical.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/mouse/elantech.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 2d8434b7b623..e4f394cc0520 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1897,7 +1897,7 @@ static bool elantech_use_host_notify(struct psmouse *psmouse,
int elantech_init_smbus(struct psmouse *psmouse)
{
struct elantech_device_info info;
- int error = -EINVAL;
+ int error;
psmouse_reset(psmouse);
@@ -2015,7 +2015,7 @@ static int elantech_setup_ps2(struct psmouse *psmouse,
int elantech_init_ps2(struct psmouse *psmouse)
{
struct elantech_device_info info;
- int error = -EINVAL;
+ int error;
psmouse_reset(psmouse);
@@ -2036,7 +2036,7 @@ int elantech_init_ps2(struct psmouse *psmouse)
int elantech_init(struct psmouse *psmouse)
{
struct elantech_device_info info;
- int error = -EINVAL;
+ int error;
psmouse_reset(psmouse);