diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-25 09:17:23 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-20 11:54:56 -0700 |
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) if (rc) return rc; rc = platform_driver_register(&mcf_platform_driver); - if (rc) + if (rc) { + uart_unregister_driver(&mcf_driver); return rc; + } return 0; } |