staging: dgnc: remove redundant !ch checks
authorGiedrius Statkevičius <giedrius.statkevicius@gmail.com>
Thu, 9 Apr 2015 23:42:31 +0000 (02:42 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 May 2015 07:24:00 +0000 (09:24 +0200)
Remove checks that are redundant since we don't have boards with partially
initialized ->channels[i].

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_cls.c
drivers/staging/dgnc/dgnc_neo.c

index e3564d278d917d71613bce0d85fd999768c42590..a629a78964ce0d2f4c4afa59f39fb7403582c547 100644 (file)
@@ -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
index 631240850bca97e06fac8361fb166b38cfefc1cb..900e3ae55a38fc4bf6dfdfbb32afb0670dddf540 100644 (file)
@@ -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 */