Commit 05b84650 authored by Colin Ian King's avatar Colin Ian King Committed by Dmitry Torokhov

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: default avatarColin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20200603140431.131347-1-colin.king@canonical.comSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent d0ac7079
...@@ -1897,7 +1897,7 @@ static bool elantech_use_host_notify(struct psmouse *psmouse, ...@@ -1897,7 +1897,7 @@ static bool elantech_use_host_notify(struct psmouse *psmouse,
int elantech_init_smbus(struct psmouse *psmouse) int elantech_init_smbus(struct psmouse *psmouse)
{ {
struct elantech_device_info info; struct elantech_device_info info;
int error = -EINVAL; int error;
psmouse_reset(psmouse); psmouse_reset(psmouse);
...@@ -2015,7 +2015,7 @@ static int elantech_setup_ps2(struct psmouse *psmouse, ...@@ -2015,7 +2015,7 @@ static int elantech_setup_ps2(struct psmouse *psmouse,
int elantech_init_ps2(struct psmouse *psmouse) int elantech_init_ps2(struct psmouse *psmouse)
{ {
struct elantech_device_info info; struct elantech_device_info info;
int error = -EINVAL; int error;
psmouse_reset(psmouse); psmouse_reset(psmouse);
...@@ -2036,7 +2036,7 @@ int elantech_init_ps2(struct psmouse *psmouse) ...@@ -2036,7 +2036,7 @@ int elantech_init_ps2(struct psmouse *psmouse)
int elantech_init(struct psmouse *psmouse) int elantech_init(struct psmouse *psmouse)
{ {
struct elantech_device_info info; struct elantech_device_info info;
int error = -EINVAL; int error;
psmouse_reset(psmouse); psmouse_reset(psmouse);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment