* [PATCH] driver: tty: add missing unregister in err case
@ 2013-05-29 2:33 ` Libo Chen
0 siblings, 0 replies; 5+ messages in thread
From: Libo Chen @ 2013-05-29 2:33 UTC (permalink / raw)
To: timur, Greg KH
Cc: jslaby, Grant Likely, Rob Herring, linux-serial, linuxppc-dev,
linux-kernel, Li Zefan
when platform_driver_register broken, we should unregister ucc_uart_driver
Signed-off-by: Libo chen <libo.chen@huawei.com>
---
drivers/tty/serial/ucc_uart.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 7355303..f86f447 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1518,9 +1518,11 @@ static int __init ucc_uart_init(void)
}
ret = platform_driver_register(&ucc_uart_of_driver);
- if (ret)
+ if (ret) {
printk(KERN_ERR
"ucc-uart: could not register platform driver\n");
+ uart_unregister_driver(&ucc_uart_driver);
+ }
return ret;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] driver: tty: add missing unregister in err case
@ 2013-05-29 2:33 ` Libo Chen
0 siblings, 0 replies; 5+ messages in thread
From: Libo Chen @ 2013-05-29 2:33 UTC (permalink / raw)
To: timur, Greg KH
Cc: jslaby, linux-kernel, Rob Herring, Li Zefan, linux-serial,
Grant Likely, linuxppc-dev
when platform_driver_register broken, we should unregister ucc_uart_driver
Signed-off-by: Libo chen <libo.chen@huawei.com>
---
drivers/tty/serial/ucc_uart.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 7355303..f86f447 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1518,9 +1518,11 @@ static int __init ucc_uart_init(void)
}
ret = platform_driver_register(&ucc_uart_of_driver);
- if (ret)
+ if (ret) {
printk(KERN_ERR
"ucc-uart: could not register platform driver\n");
+ uart_unregister_driver(&ucc_uart_driver);
+ }
return ret;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] driver: tty: add missing unregister in err case
@ 2013-05-29 2:33 ` Libo Chen
0 siblings, 0 replies; 5+ messages in thread
From: Libo Chen @ 2013-05-29 2:33 UTC (permalink / raw)
To: timur, Greg KH
Cc: jslaby, Grant Likely, Rob Herring, linux-serial, linuxppc-dev,
linux-kernel, Li Zefan
when platform_driver_register broken, we should unregister ucc_uart_driver
Signed-off-by: Libo chen <libo.chen@huawei.com>
---
drivers/tty/serial/ucc_uart.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
index 7355303..f86f447 100644
--- a/drivers/tty/serial/ucc_uart.c
+++ b/drivers/tty/serial/ucc_uart.c
@@ -1518,9 +1518,11 @@ static int __init ucc_uart_init(void)
}
ret = platform_driver_register(&ucc_uart_of_driver);
- if (ret)
+ if (ret) {
printk(KERN_ERR
"ucc-uart: could not register platform driver\n");
+ uart_unregister_driver(&ucc_uart_driver);
+ }
return ret;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] driver: tty: add missing unregister in err case
2013-05-29 2:33 ` Libo Chen
@ 2013-05-29 2:37 ` Timur Tabi
-1 siblings, 0 replies; 5+ messages in thread
From: Timur Tabi @ 2013-05-29 2:37 UTC (permalink / raw)
To: Libo Chen, Greg KH
Cc: jslaby, Grant Likely, Rob Herring, linux-serial, linuxppc-dev,
linux-kernel, Li Zefan
Libo Chen wrote:
> when platform_driver_register broken, we should unregister ucc_uart_driver
>
> Signed-off-by: Libo chen<libo.chen@huawei.com>
Acked-by: Timur Tabi <timur@tabi.org>
Thanks for catching this.
--
Timur Tabi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] driver: tty: add missing unregister in err case
@ 2013-05-29 2:37 ` Timur Tabi
0 siblings, 0 replies; 5+ messages in thread
From: Timur Tabi @ 2013-05-29 2:37 UTC (permalink / raw)
To: Libo Chen, Greg KH
Cc: jslaby, linux-kernel, Rob Herring, Li Zefan, linux-serial,
Grant Likely, linuxppc-dev
Libo Chen wrote:
> when platform_driver_register broken, we should unregister ucc_uart_driver
>
> Signed-off-by: Libo chen<libo.chen@huawei.com>
Acked-by: Timur Tabi <timur@tabi.org>
Thanks for catching this.
--
Timur Tabi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-29 2:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-29 2:33 [PATCH] driver: tty: add missing unregister in err case Libo Chen
2013-05-29 2:33 ` Libo Chen
2013-05-29 2:33 ` Libo Chen
2013-05-29 2:37 ` Timur Tabi
2013-05-29 2:37 ` Timur Tabi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.