diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-24 21:17:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-20 14:54:56 -0400 |
commit | 2b359172e013c6b1b7e424e5be92a70fc7cceaaf (patch) | |
tree | 6d17b11f6aa885312bd35dd4f76faacea409f8dd | |
parent | 9bcc3278445bedc272dc2c432e81502d00ac9182 (diff) |
serial: mcf: missing uart_unregister_driver() on error in mcf_init()
Add the missing uart_unregister_driver() before return
from mcf_init() in the error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/mcf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/tty/serial/mcf.c b/drivers/tty/serial/mcf.c index e956377a38fe..65be0c00c4bf 100644 --- a/drivers/tty/serial/mcf.c +++ b/drivers/tty/serial/mcf.c | |||
@@ -707,8 +707,10 @@ static int __init mcf_init(void) | |||
707 | if (rc) | 707 | if (rc) |
708 | return rc; | 708 | return rc; |
709 | rc = platform_driver_register(&mcf_platform_driver); | 709 | rc = platform_driver_register(&mcf_platform_driver); |
710 | if (rc) | 710 | if (rc) { |
711 | uart_unregister_driver(&mcf_driver); | ||
711 | return rc; | 712 | return rc; |
713 | } | ||
712 | return 0; | 714 | return 0; |
713 | } | 715 | } |
714 | 716 | ||