From 071494d832ae2e7a318f86e8d9854ee26b8f1134 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Giedrius=20Statkevi=C4=8Dius?= Date: Fri, 10 Apr 2015 02:42:31 +0300 Subject: [PATCH] staging: dgnc: remove redundant !ch checks MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Remove checks that are redundant since we don't have boards with partially initialized ->channels[i]. Signed-off-by: Giedrius Statkevičius Signed-off-by: Greg Kroah-Hartman --- drivers/staging/dgnc/dgnc_cls.c | 4 +--- drivers/staging/dgnc/dgnc_neo.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_cls.c b/drivers/staging/dgnc/dgnc_cls.c index e3564d278d91..a629a78964ce 100644 --- a/drivers/staging/dgnc/dgnc_cls.c +++ b/drivers/staging/dgnc/dgnc_cls.c @@ -379,7 +379,7 @@ static inline void cls_parse_isr(struct dgnc_board *brd, uint port) return; ch = brd->channels[port]; - if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) + if (ch->magic != DGNC_CHANNEL_MAGIC) return; /* Here we try to figure out what caused the interrupt to happen */ @@ -714,8 +714,6 @@ static void cls_tasklet(unsigned long data) /* Loop on each port */ for (i = 0; i < ports; i++) { ch = bd->channels[i]; - if (!ch) - continue; /* * NOTE: Remember you CANNOT hold any channel diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 631240850bca..900e3ae55a38 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -395,7 +395,7 @@ static inline void neo_parse_isr(struct dgnc_board *brd, uint port) return; ch = brd->channels[port]; - if (!ch || ch->magic != DGNC_CHANNEL_MAGIC) + if (ch->magic != DGNC_CHANNEL_MAGIC) return; /* Here we try to figure out what caused the interrupt to happen */ -- 2.30.2