summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/serial_txx9.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/serial_txx9.c')
-rw-r--r--drivers/tty/serial/serial_txx9.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index d22ccb32aa9b..8507f18900d0 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -1283,6 +1283,9 @@ static int __init serial_txx9_init(void)
#ifdef ENABLE_SERIAL_TXX9_PCI
ret = pci_register_driver(&serial_txx9_pci_driver);
+ if (ret) {
+ platform_driver_unregister(&serial_txx9_plat_driver);
+ }
#endif
if (ret == 0)
goto out;