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>
This commit is contained in:
Wei Yongjun 2013-04-25 09:17:23 +08:00 committed by Greg Kroah-Hartman
parent 9bcc327844
commit 2b359172e0

View File

@ -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;
}