summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/char/cyclades.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 0634dd1c773a..d15234c5965e 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -5362,13 +5362,13 @@ static int __init cy_init(void)
#ifdef CONFIG_PCI
/* look for pci boards */
retval = pci_register_driver(&cy_pci_driver);
- if (retval && !nboards)
- goto err_unr;
+ if (retval && !nboards) {
+ tty_unregister_driver(cy_serial_driver);
+ goto err_frtty;
+ }
#endif
return 0;
-err_unr:
- tty_unregister_driver(cy_serial_driver);
err_frtty:
put_tty_driver(cy_serial_driver);
err: