summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorMasahiro Yamada2015-07-24 08:58:28 +0200
committerGreg Kroah-Hartman2015-08-04 00:51:19 +0200
commite70e69bf205e6d1f742f1cf1935b155417c9e29a (patch)
tree2f4b611e3de6f7e0f29fcb283498ec5c3900643a /drivers/tty/serial
parentserial: 8250_pci: add RS485 for F81504/508/512 (diff)
downloadkernel-qcow2-linux-e70e69bf205e6d1f742f1cf1935b155417c9e29a.tar.gz
kernel-qcow2-linux-e70e69bf205e6d1f742f1cf1935b155417c9e29a.tar.xz
kernel-qcow2-linux-e70e69bf205e6d1f742f1cf1935b155417c9e29a.zip
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 <yamada.masahiro@socionext.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/8250/8250_uniphier.c1
1 files changed, 1 insertions, 0 deletions
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;
}