diff mbox series

[1/3] serial-uartlite: Disable clocks in the error path

Message ID 1607516301-26975-1-git-send-email-shubhrajyoti.datta@xilinx.com
State Superseded
Headers show
Series [1/3] serial-uartlite: Disable clocks in the error path | expand

Commit Message

Shubhrajyoti Datta Dec. 9, 2020, 12:18 p.m. UTC
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(-)

Comments

Greg Kroah-Hartman Dec. 9, 2020, 2:33 p.m. UTC | #1
On Wed, Dec 09, 2020 at 05:48:20PM +0530, Shubhrajyoti Datta wrote:
>  Add runtime pm support

Again, we need more information here.

thanks,

greg k-h
diff mbox series

Patch

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)