All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: dgap: Merge two separate if conditions
@ 2016-02-09 17:17 Janani Ravichandran
  2016-02-09 12:22 ` [Outreachy kernel] " Sudip Mukherjee
  0 siblings, 1 reply; 3+ messages in thread
From: Janani Ravichandran @ 2016-02-09 17:17 UTC (permalink / raw)
  To: outreachy-kernel

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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-09 12:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09 17:17 [PATCH] staging: dgap: Merge two separate if conditions Janani Ravichandran
2016-02-09 12:22 ` [Outreachy kernel] " Sudip Mukherjee
2016-02-09 12:25   ` Julia Lawall

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.