Skip to contentSkip to conversation

patch "serial: ar933x_uart: disable clk on error handling path in probe" added to tty-linus

PATCH [email protected] 1 participant 1 message Nov 12, 2020

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

serial: ar933x_uart: disable clk on error handling path in probe

to my tty git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
in the tty-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 425af483523b76bc78e14674a430579d38b2a593 Mon Sep 17 00:00:00 2001
From: Zheng Zengkai <[email protected]>
Date: Wed, 11 Nov 2020 20:44:26 +0800
Subject: serial: ar933x_uart: disable clk on error handling path in probe

ar933x_uart_probe() does not invoke clk_disable_unprepare() on one error handling path. This patch fixes that.

Fixes 9be1064fe524 ("serial: ar933x_uart: add RS485 support")
Cc stable <[email protected]>
---
 drivers/tty/serial/ar933x_uart.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/tty/serial/ar933x_uart.c +4 -2
index 0c80a79d7442..c2be7cf91399 100644
@@ -789,8 +789,10 @@ static int ar933x_uart_probe(struct platform_device *pdev)
 		goto err_disable_clk;
 
 	up->gpios = mctrl_gpio_init(port, 0);
-	if (IS_ERR(up->gpios) && PTR_ERR(up->gpios) != -ENOSYS)
-		return PTR_ERR(up->gpios);
+	if (IS_ERR(up->gpios) && PTR_ERR(up->gpios) != -ENOSYS) {
+		ret = PTR_ERR(up->gpios);
+		goto err_disable_clk;
+	}
 
 	up->rts_gpiod = mctrl_gpio_to_gpiod(up->gpios, UART_GPIO_RTS);
 
Signature · 1 line
2.29.2