Skip to contentSkip to conversation

patch "serial: txx9: add missing platform_driver_unregister() on error in" added to tty-linus

PATCH [email protected] 1 participant 1 message Nov 6, 2020

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

serial: txx9: add missing platform_driver_unregister() on error in

to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 0c5fc92622ed5531ff324b20f014e9e3092f0187 Mon Sep 17 00:00:00 2001
From: Qinglang Miao <[email protected]>
Date: Tue, 3 Nov 2020 16:49:42 +0800
Subject: serial: txx9: add missing platform_driver_unregister() on error in
serial_txx9_init

Add the missing platform_driver_unregister() before return from serial_txx9_init in the error handling case when failed to register serial_txx9_pci_driver with macro ENABLE_SERIAL_TXX9_PCI defined.

Fixes ab4382d27412 ("tty: move drivers/serial/ to drivers/tty/serial/")
Cc stable <[email protected]>
---
 drivers/tty/serial/serial_txx9.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/tty/serial/serial_txx9.c +3 -0
index b4d89e31730e..7a07e7272de1 100644
@@ -1280,6 +1280,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;
Signature · 1 line
2.29.2