Skip to contentSkip to conversation

vme: remove redundant else condition

PATCH New Fred Chou 1 participant 1 message Aug 28, 2014 Staging

lore
Share & tools
lore

Fred Chou

author
#0 lore raw

PATCH 1/1 vme: remove redundant else condition

The else condition is redundant after a return. Remove these redundant else conditions.

---
 drivers/staging/vme/devices/vme_pio2_gpio.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/vme/devices/vme_pio2_gpio.c +7 -7
index f00af07..d8a118d 100644
@@ -58,14 +58,14 @@ static int pio2_gpio_get(struct gpio_chip *chip, unsigned int offset)
 	if (reg & PIO2_CHANNEL_BIT[offset]) {
 		if (card->bank[PIO2_CHANNEL_BANK[offset]].config != BOTH)
 			return 0;
-		else
-			return 1;
-	} else {
-		if (card->bank[PIO2_CHANNEL_BANK[offset]].config != BOTH)
-			return 1;
-		else
-			return 0;
+
+		return 1;
 	}
+
+	if (card->bank[PIO2_CHANNEL_BANK[offset]].config != BOTH)
+		return 1;
+
+	return 0;
 }
 
 static void pio2_gpio_set(struct gpio_chip *chip, unsigned int offset,
Signature · 1 line
1.7.9.5