Commit 7ccd7020 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

ip2: fix sparse warnings

Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cf176bc3
...@@ -375,9 +375,7 @@ have_requested_irq( char irq ) ...@@ -375,9 +375,7 @@ have_requested_irq( char irq )
/* handle subsequent installations of the driver. All memory allocated by the */ /* handle subsequent installations of the driver. All memory allocated by the */
/* driver should be returned since it may be unloaded from memory. */ /* driver should be returned since it may be unloaded from memory. */
/******************************************************************************/ /******************************************************************************/
#ifdef MODULE static void __exit ip2_cleanup_module(void)
void __exit
ip2_cleanup_module(void)
{ {
int err; int err;
int i; int i;
...@@ -431,7 +429,8 @@ ip2_cleanup_module(void) ...@@ -431,7 +429,8 @@ ip2_cleanup_module(void)
ip2config.pci_dev[i] = NULL; ip2config.pci_dev[i] = NULL;
} }
#endif #endif
if ((pB = i2BoardPtrTable[i]) != 0 ) { pB = i2BoardPtrTable[i];
if (pB != NULL) {
kfree ( pB ); kfree ( pB );
i2BoardPtrTable[i] = NULL; i2BoardPtrTable[i] = NULL;
} }
...@@ -448,7 +447,6 @@ ip2_cleanup_module(void) ...@@ -448,7 +447,6 @@ ip2_cleanup_module(void)
#endif #endif
} }
module_exit(ip2_cleanup_module); module_exit(ip2_cleanup_module);
#endif /* MODULE */
static const struct tty_operations ip2_ops = { static const struct tty_operations ip2_ops = {
.open = ip2_open, .open = ip2_open,
...@@ -1255,9 +1253,8 @@ ip2_polled_interrupt(void) ...@@ -1255,9 +1253,8 @@ ip2_polled_interrupt(void)
{ {
int i; int i;
i2eBordStrPtr pB; i2eBordStrPtr pB;
const int irq = 0;
ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq ); ip2trace(ITRC_NO_PORT, ITRC_INTR, 99, 1, 0);
/* Service just the boards on the list using this irq */ /* Service just the boards on the list using this irq */
for( i = 0; i < i2nBoards; ++i ) { for( i = 0; i < i2nBoards; ++i ) {
...@@ -1266,9 +1263,8 @@ ip2_polled_interrupt(void) ...@@ -1266,9 +1263,8 @@ ip2_polled_interrupt(void)
// Only process those boards which match our IRQ. // Only process those boards which match our IRQ.
// IRQ = 0 for polled boards, we won't poll "IRQ" boards // IRQ = 0 for polled boards, we won't poll "IRQ" boards
if ( pB && (pB->i2eUsingIrq == irq) ) { if (pB && pB->i2eUsingIrq == 0)
ip2_irq_work(pB); ip2_irq_work(pB);
}
} }
++irq_counter; ++irq_counter;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment