Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: twl4030: Remove redundant assignment

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>

authored by

Alexander Shiyan and committed by
Linus Walleij
fd0f885b a54aef50

+3 -3
+3 -3
drivers/gpio/gpio-twl4030.c
··· 139 139 static void twl4030_led_set_value(int led, int value) 140 140 { 141 141 u8 mask = LEDEN_LEDAON | LEDEN_LEDAPWM; 142 - int status; 143 142 144 143 if (led) 145 144 mask <<= 1; ··· 147 148 cached_leden &= ~mask; 148 149 else 149 150 cached_leden |= mask; 150 - status = twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden, 151 - TWL4030_LED_LEDEN_REG); 151 + 152 + WARN_ON_ONCE(twl_i2c_write_u8(TWL4030_MODULE_LED, cached_leden, 153 + TWL4030_LED_LEDEN_REG)); 152 154 } 153 155 154 156 static int twl4030_set_gpio_direction(int gpio, int is_input)