From: Janani Ravichandran <janani.rvchndrn@gmail.com>
To: outreachy-kernel@googlegroups.com
Subject: [PATCH] staging: dgap: Merge two separate if conditions
Date: Tue, 9 Feb 2016 12:17:35 -0500 [thread overview]
Message-ID: <20160209171735.GA4048@janani-Inspiron-3521> (raw)
Merge two if conditions with the same statements to avoid code
duplication.
Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
---
drivers/staging/dgap/dgap.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index bad3551..d7eb879 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -2014,11 +2014,7 @@ static void dgap_poll_tasklet(unsigned long data)
if (bd->state == BOARD_READY) {
struct ev_t __iomem *eaddr;
- if (!bd->re_map_membase) {
- spin_unlock_irqrestore(&bd->bd_lock, lock_flags);
- return;
- }
- if (!bd->re_map_port) {
+ if (!bd->re_map_membase || !bd->re_map_port) {
spin_unlock_irqrestore(&bd->bd_lock, lock_flags);
return;
}
--
2.5.0
next reply other threads:[~2016-02-09 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-09 17:17 Janani Ravichandran [this message]
2016-02-09 12:22 ` [Outreachy kernel] [PATCH] staging: dgap: Merge two separate if conditions Sudip Mukherjee
2016-02-09 12:25 ` Julia Lawall
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=20160209171735.GA4048@janani-Inspiron-3521 \
--to=janani.rvchndrn@gmail.com \
--cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.