public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] staging: dgnc: remove redundant condition check
@ 2016-05-09  2:47 Daeseok Youn
  0 siblings, 0 replies; only message in thread
From: Daeseok Youn @ 2016-05-09  2:47 UTC (permalink / raw)
  To: lidza.louina
  Cc: markh, gregkh, driverdev-devel, devel, linux-kernel,
	kernel-janitors

dgnc_board(brd) was already checked for NULL before calling
neo_parse_isr(). And also port doesn't need to check.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/dgnc/dgnc_neo.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c
index 3b8ce38..9eae1a6 100644
--- a/drivers/staging/dgnc/dgnc_neo.c
+++ b/drivers/staging/dgnc/dgnc_neo.c
@@ -379,12 +379,6 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port)
 	unsigned char cause;
 	unsigned long flags;
 
-	if (!brd || brd->magic != DGNC_BOARD_MAGIC)
-		return;
-
-	if (port >= brd->maxports)
-		return;
-
 	ch = brd->channels[port];
 	if (ch->magic != DGNC_CHANNEL_MAGIC)
 		return;
-- 
2.8.2

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

only message in thread, other threads:[~2016-05-09  2:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-09  2:47 [PATCH 2/3] staging: dgnc: remove redundant condition check Daeseok Youn

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