mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] vme: remove redundant else condition
@ 2014-08-28  1:50 Fred Chou
  0 siblings, 0 replies; only message in thread
From: Fred Chou @ 2014-08-28  1:50 UTC (permalink / raw)
  To: martyn.welch, manohar.vanga, gregkh
  Cc: standby24x7, fred.chou.nd, devel, linux-kernel

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

Signed-off-by: Fred Chou <fred.chou.nd@gmail.com>
---
 drivers/staging/vme/devices/vme_pio2_gpio.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/vme/devices/vme_pio2_gpio.c b/drivers/staging/vme/devices/vme_pio2_gpio.c
index f00af07..d8a118d 100644
--- a/drivers/staging/vme/devices/vme_pio2_gpio.c
+++ b/drivers/staging/vme/devices/vme_pio2_gpio.c
@@ -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,
-- 
1.7.9.5


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-28  1:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-28  1:50 [PATCH] vme: remove redundant else condition Fred Chou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®