diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-04-25 01:17:23 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-20 18:54:56 (GMT) |
commit | 2b359172e013c6b1b7e424e5be92a70fc7cceaaf (patch) | |
tree | 6d17b11f6aa885312bd35dd4f76faacea409f8dd /drivers/tty/serial | |
parent | 9bcc3278445bedc272dc2c432e81502d00ac9182 (diff) | |
download | linux-2b359172e013c6b1b7e424e5be92a70fc7cceaaf.tar.xz |
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>
Diffstat (limited to 'drivers/tty/serial')
-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 e956377..65be0c0 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; } |