Skip to content

Commit

Permalink
gpio: twl4030: Remove redundant assignment
Browse files Browse the repository at this point in the history
Variable "status" is never used, so remove it and add warning if
any error happen.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
shcgit authored and pstglia committed Sep 27, 2014
1 parent cb78b56 commit 3571f14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/gpio/gpio-twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);

WARN_ON_ONCE(twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden,
TWL4030_LED_LEDEN_REG));
}

static int twl4030_set_gpio_direction(int gpio, int is_input)
Expand Down

0 comments on commit 3571f14

Please sign in to comment.