diff mbox series

Input: elants_i2c - delete some dead code

Message ID Y33BD9xkRC9euIdO@kili (mailing list archive)
State Mainlined
Commit 80fb249da98e6b9e7c3d356da912a67757e92e75
Headers show
Series Input: elants_i2c - delete some dead code | expand

Commit Message

Dan Carpenter Nov. 23, 2022, 6:43 a.m. UTC
We shuffled the error handling around so this condition is dead code
now.  The "error" variable is always zero.

Signed-off-by: Dan Carpenter <error27@gmail.com>
---
No Fixes tag because this does not fix a bug but if we were to assign
a tag it would be:

Fixes: a85fbd649844 ("Input: elants_i2c - properly handle the reset GPIO when power is off")

 drivers/input/touchscreen/elants_i2c.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Mattijs Korpershoek Nov. 28, 2022, 1:43 p.m. UTC | #1
On Wed, Nov 23, 2022 at 09:43, Dan Carpenter <error27@gmail.com> wrote:

> We shuffled the error handling around so this condition is dead code
> now.  The "error" variable is always zero.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>

> ---
> No Fixes tag because this does not fix a bug but if we were to assign
> a tag it would be:
>
> Fixes: a85fbd649844 ("Input: elants_i2c - properly handle the reset GPIO when power is off")
>
>  drivers/input/touchscreen/elants_i2c.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
> index e1308e179dd6..af1dc43e988c 100644
> --- a/drivers/input/touchscreen/elants_i2c.c
> +++ b/drivers/input/touchscreen/elants_i2c.c
> @@ -1353,8 +1353,6 @@ static int elants_i2c_power_on(struct elants_data *ts)
>  	udelay(ELAN_POWERON_DELAY_USEC);
>  
>  	gpiod_set_value_cansleep(ts->reset_gpio, 0);
> -	if (error)
> -		return error;
>  
>  	msleep(ELAN_RESET_DELAY_MSEC);
>  
> -- 
> 2.35.1
Doug Anderson Nov. 28, 2022, 10:59 p.m. UTC | #2
Hi,

On Tue, Nov 22, 2022 at 10:43 PM Dan Carpenter <error27@gmail.com> wrote:
>
> We shuffled the error handling around so this condition is dead code
> now.  The "error" variable is always zero.
>
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> ---
> No Fixes tag because this does not fix a bug but if we were to assign
> a tag it would be:
>
> Fixes: a85fbd649844 ("Input: elants_i2c - properly handle the reset GPIO when power is off")
>
>  drivers/input/touchscreen/elants_i2c.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
> index e1308e179dd6..af1dc43e988c 100644
> --- a/drivers/input/touchscreen/elants_i2c.c
> +++ b/drivers/input/touchscreen/elants_i2c.c
> @@ -1353,8 +1353,6 @@ static int elants_i2c_power_on(struct elants_data *ts)
>         udelay(ELAN_POWERON_DELAY_USEC);
>
>         gpiod_set_value_cansleep(ts->reset_gpio, 0);
> -       if (error)
> -               return error;

Reviewed-by: Douglas Anderson <dianders@chromium.org>
Dmitry Torokhov Nov. 29, 2022, 11:04 p.m. UTC | #3
On Wed, Nov 23, 2022 at 09:43:27AM +0300, Dan Carpenter wrote:
> We shuffled the error handling around so this condition is dead code
> now.  The "error" variable is always zero.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>

Applied, thank you.
diff mbox series

Patch

diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c
index e1308e179dd6..af1dc43e988c 100644
--- a/drivers/input/touchscreen/elants_i2c.c
+++ b/drivers/input/touchscreen/elants_i2c.c
@@ -1353,8 +1353,6 @@  static int elants_i2c_power_on(struct elants_data *ts)
 	udelay(ELAN_POWERON_DELAY_USEC);
 
 	gpiod_set_value_cansleep(ts->reset_gpio, 0);
-	if (error)
-		return error;
 
 	msleep(ELAN_RESET_DELAY_MSEC);