From: Fred Chou <fred.chou.nd@gmail.com>
To: martyn.welch@ge.com, manohar.vanga@gmail.com, gregkh@linuxfoundation.org
Cc: standby24x7@gmail.com, fred.chou.nd@gmail.com,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] vme: remove redundant else condition
Date: Thu, 28 Aug 2014 09:50:56 +0800 [thread overview]
Message-ID: <1409190656-17762-1-git-send-email-fred.chou.nd@gmail.com> (raw)
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
reply other threads:[~2014-08-28 1:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409190656-17762-1-git-send-email-fred.chou.nd@gmail.com \
--to=fred.chou.nd@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manohar.vanga@gmail.com \
--cc=martyn.welch@ge.com \
--cc=standby24x7@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®