* [PATCH v2] serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init
@ 2020-11-03 7:33 Qinglang Miao
2020-11-03 7:45 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Qinglang Miao @ 2020-11-03 7:33 UTC (permalink / raw)
To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linux-serial, linux-kernel, Qinglang Miao
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/")
Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
---
drivers/tty/serial/serial_txx9.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/tty/serial/serial_txx9.c b/drivers/tty/serial/serial_txx9.c
index b4d89e317..7a07e7272 100644
--- a/drivers/tty/serial/serial_txx9.c
+++ b/drivers/tty/serial/serial_txx9.c
@@ -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;
--
2.23.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init
2020-11-03 7:33 [PATCH v2] serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init Qinglang Miao
@ 2020-11-03 7:45 ` Greg Kroah-Hartman
2020-11-06 3:19 ` Qinglang Miao
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2020-11-03 7:45 UTC (permalink / raw)
To: Qinglang Miao; +Cc: Jiri Slaby, linux-serial, linux-kernel
On Tue, Nov 03, 2020 at 03:33:41PM +0800, Qinglang Miao wrote:
> 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/")
> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
> ---
> drivers/tty/serial/serial_txx9.c | 3 +++
> 1 file changed, 3 insertions(+)
What changed from v1? Always put that below the --- line.
Please fix up and send v3.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init
2020-11-03 7:45 ` Greg Kroah-Hartman
@ 2020-11-06 3:19 ` Qinglang Miao
0 siblings, 0 replies; 3+ messages in thread
From: Qinglang Miao @ 2020-11-06 3:19 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-serial, linux-kernel
在 2020/11/3 15:45, Greg Kroah-Hartman 写道:
> On Tue, Nov 03, 2020 at 03:33:41PM +0800, Qinglang Miao wrote:
>> 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/")
>> Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
>> ---
>> drivers/tty/serial/serial_txx9.c | 3 +++
>> 1 file changed, 3 insertions(+)
>
> What changed from v1? Always put that below the --- line.
>
> Please fix up and send v3.
>
> thanks,
>
> greg k-h
> .
Hi Greg,
Sorry about that. I've resent a new v3 patch showing the changes.
Thanks.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-06 3:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03 7:33 [PATCH v2] serial: txx9: add missing platform_driver_unregister() on error in serial_txx9_init Qinglang Miao
2020-11-03 7:45 ` Greg Kroah-Hartman
2020-11-06 3:19 ` Qinglang Miao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).