Thread (2 messages) 2 messages, 2 authors, 2015-07-24
STALE3976d

[PATCH] serial: 8250_uniphier: call clk_disable_unprepare() on failure path

From: Masahiro Yamada <hidden>
Date: 2015-07-24 06:59:31
Also in: linux-serial, lkml
Subsystem: 8250/16?50 (and clone uarts) serial driver, arm/uniphier architecture, the rest, tty layer and serial drivers · Maintainers: Greg Kroah-Hartman, Kunihiko Hayashi, Masami Hiramatsu, Linus Torvalds, Jiri Slaby

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 <redacted>
---

 drivers/tty/serial/8250/8250_uniphier.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c
index 7d79425..d11621e 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;
 	}
 
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help