Skip to contentSkip to conversation

bug in /drivers/char/epca.c

PATCH New Andrey Panin 1 participant 1 message Mar 6, 2001 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bug in /drivers/char/epca.c

Hi all,

this patch fixes bug in Digi epca.c driver. This driver calls tty_register_driver() 3 times and tty_unregister_driver() 2 times. This bug causes hang on module unload.

Also a question: somebody knows why this driver scans PCI devices before registering tty drivers? It makes impossible to remove panic() calls easily.

Best regards.

Signature · 2 lines
Andrey Panin            | Embedded systems software engineer
[email protected]        | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
drivers/char/epca.c +2 -1
diff -ur linux.vanilla/drivers/char/epca.c linux/drivers/char/epca.c
@@ -1574,7 +1574,8 @@
 	cli();
 
 	if ((tty_unregister_driver(&pc_driver)) ||  
-	    (tty_unregister_driver(&pc_callout)))
+	    (tty_unregister_driver(&pc_callout)) ||
+	    (tty_unregister_driver(&pc_info)))
 	{
 		printk(KERN_WARNING "<Error> - DIGI : cleanup_module failed to un-register tty driver\n");
 		restore_flags(flags);