serial: sccnxp: missing uart_unregister_driver() on error in sccnxp_probe()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 23 Sep 2013 13:54:20 +0000 (21:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 22:44:45 +0000 (15:44 -0700)
Add the missing uart_unregister_driver() before return
from sccnxp_probe() in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sccnxp.c

index 49e9bbf..a447f71 100644 (file)
@@ -986,6 +986,7 @@ static int sccnxp_probe(struct platform_device *pdev)
                return 0;
        }
 
+       uart_unregister_driver(&s->uart);
 err_out:
        if (!IS_ERR(s->regulator))
                return regulator_disable(s->regulator);