Skip to contentSkip to conversation

gpio: twl4030: Remove redundant assignment

PATCH In review Alexander Shiyan 2 participants 2 messages Mar 22, 2014 – Mar 27, 2014 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: twl4030: Remove redundant assignment

Variable "status" is never used, so remove it and add warning if any error happen.

---
 drivers/gpio/gpio-twl4030.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpio/gpio-twl4030.c +3 -3
index 8b88ca2..3ebb1a5 100644
@@ -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);
+
+	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)
Signature · 1 line
1.8.3.2