Re: [PATCH] gpio: twl4030: Remove redundant assignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Feb 15, 2014 at 2:34 PM, Alexander Shiyan <shc_work@xxxxxxx> wrote:

> Variable "status" is never used, so remove it.
>
> Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
> ---
>  drivers/gpio/gpio-twl4030.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpio/gpio-twl4030.c b/drivers/gpio/gpio-twl4030.c
> index 8b88ca2..fa15beb 100644
> --- a/drivers/gpio/gpio-twl4030.c
> +++ b/drivers/gpio/gpio-twl4030.c
> @@ -139,7 +139,6 @@ static u8 cached_leden;
>  static void twl4030_led_set_value(int led, int value)
>  {
>         u8 mask = LEDEN_LEDAON | LEDEN_LEDAPWM;
> -       int status;
>
>         if (led)
>                 mask <<= 1;
> @@ -148,8 +147,9 @@ static void twl4030_led_set_value(int led, int value)
>                 cached_leden &= ~mask;
>         else
>                 cached_leden |= mask;
> -       status = twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
> -                                 TWL4030_LED_LEDEN_REG);
> +
> +       twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
> +                        TWL4030_LED_LEDEN_REG);

Isn't the right fix to actually *check* this status instead?

TI dudes?

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux