From: Masahiro Yamada Date: Fri, 24 Jul 2015 06:58:28 +0000 (+0900) Subject: serial: 8250_uniphier: call clk_disable_unprepare() on failure path X-Git-Tag: firefly_0821_release~176^2~1220^2~36 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e70e69bf205e6d1f742f1cf1935b155417c9e29a;p=firefly-linux-kernel-4.4.55.git serial: 8250_uniphier: call clk_disable_unprepare() on failure path If serial8250_register_8250_port() fails, disable and unprepare the clock before exiting. Fixes: 1a8d2903cb6a ("serial: 8250_uniphier: add UniPhier serial driver") Signed-off-by: Masahiro Yamada Reviewed-by: Matthias Brugger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c index 7d79425c2b09..d11621e2cf1d 100644 --- a/drivers/tty/serial/8250/8250_uniphier.c +++ b/drivers/tty/serial/8250/8250_uniphier.c @@ -218,6 +218,7 @@ static int uniphier_uart_probe(struct platform_device *pdev) ret = serial8250_register_8250_port(&up); if (ret < 0) { dev_err(dev, "failed to register 8250 port\n"); + clk_disable_unprepare(priv->clk); return ret; }