From: Wei Yongjun Date: Mon, 23 Sep 2013 13:54:20 +0000 (+0800) Subject: serial: sccnxp: missing uart_unregister_driver() on error in sccnxp_probe() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7a95b815da307d66430f30d7b18dcddce62507bd;p=linux-beck.git serial: sccnxp: missing uart_unregister_driver() on error in sccnxp_probe() Add the missing uart_unregister_driver() before return from sccnxp_probe() in the error handling case. Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index 49e9bbfe6cab..a447f71538ef 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c @@ -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);