[Linux-parport] [PATCH] IRQ: Fix test in __exit parport_mfc3_exit()

Roel Kluin roel.kluin at gmail.com
Tue Oct 6 11:43:38 EDT 2009


Not makes it a bool before the comparison.

Signed-off-by: Roel Kluin <roel.kluin at gmail.com>
---
PARPORT_IRQ_NONE is defined -1. Was below intended?

diff --git a/drivers/parport/parport_mfc3.c b/drivers/parport/parport_mfc3.c
index 6dec9ba..362db31 100644
--- a/drivers/parport/parport_mfc3.c
+++ b/drivers/parport/parport_mfc3.c
@@ -386,7 +386,7 @@ static void __exit parport_mfc3_exit(void)
 		if (!this_port[i])
 			continue;
 		parport_remove_port(this_port[i]);
-		if (!this_port[i]->irq != PARPORT_IRQ_NONE) {
+		if (this_port[i]->irq != PARPORT_IRQ_NONE) {
 			if (--use_cnt == 0) 
 				free_irq(IRQ_AMIGA_PORTS, &pp_mfc3_ops);
 		}



More information about the Linux-parport mailing list