All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] serial-uartlite: Disable clocks in the error path
@ 2020-12-09 12:18 Shubhrajyoti Datta
  2020-12-09 12:18 ` [PATCH 2/3] serial-uartlite: Add runtime pm support Shubhrajyoti Datta
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Shubhrajyoti Datta @ 2020-12-09 12:18 UTC (permalink / raw)
  To: linux-serial; +Cc: git, jacmet, linuxfoundation.org, Shubhrajyoti Datta

Disable clocks in the error path.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
---
 drivers/tty/serial/uartlite.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 09379db..ab4954f 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -799,7 +799,7 @@ static int ulite_probe(struct platform_device *pdev)
 		ret = uart_register_driver(&ulite_uart_driver);
 		if (ret < 0) {
 			dev_err(&pdev->dev, "Failed to register driver\n");
-			return ret;
+			goto err_out_clk_disable;
 		}
 	}
 
@@ -808,6 +808,10 @@ static int ulite_probe(struct platform_device *pdev)
 	clk_disable(pdata->clk);
 
 	return ret;
+
+err_out_clk_disable:
+	clk_disable_unprepare(pdata->clk);
+	return ret;
 }
 
 static int ulite_remove(struct platform_device *pdev)
-- 
2.1.1


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

end of thread, other threads:[~2020-12-09 14:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 12:18 [PATCH 1/3] serial-uartlite: Disable clocks in the error path Shubhrajyoti Datta
2020-12-09 12:18 ` [PATCH 2/3] serial-uartlite: Add runtime pm support Shubhrajyoti Datta
2020-12-09 14:33   ` Greg KH
2020-12-09 12:18 ` [PATCH 3/3] serial-uartlite: Remove an un-necessary read of control register Shubhrajyoti Datta
2020-12-09 14:33   ` Greg KH
2020-12-09 14:32 ` [PATCH 1/3] serial-uartlite: Disable clocks in the error path Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.