public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] serial: 8250_uniphier: call clk_disable_unprepare() on failure path
@ 2015-07-24  6:58 Masahiro Yamada
  2015-07-24 11:23 ` Matthias Brugger
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2015-07-24  6:58 UTC (permalink / raw)
  To: linux-serial
  Cc: Masahiro Yamada, Jiri Slaby, linux-kernel, Matthias Brugger,
	Greg Kroah-Hartman, linux-arm-kernel

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

 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] serial: 8250_uniphier: call clk_disable_unprepare() on failure path
  2015-07-24  6:58 [PATCH] serial: 8250_uniphier: call clk_disable_unprepare() on failure path Masahiro Yamada
@ 2015-07-24 11:23 ` Matthias Brugger
  0 siblings, 0 replies; 2+ messages in thread
From: Matthias Brugger @ 2015-07-24 11:23 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-serial, Jiri Slaby, linux-kernel, Greg Kroah-Hartman,
	linux-arm-kernel

On Friday, July 24, 2015 03:58:28 PM Masahiro Yamada wrote:
> 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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-24 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-24  6:58 [PATCH] serial: 8250_uniphier: call clk_disable_unprepare() on failure path Masahiro Yamada
2015-07-24 11:23 ` Matthias Brugger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox