[PATCH v1] tty: serial: qcom_geni_serial: Fix error handling for RS485 mode

From: Anup Kulkarni
Date: Tue Sep 16 2025 - 05:40:28 EST


If uart_get_rs485() fails, the driver returns without detaching
the PM domain list.

Fix the error handling path in uart_get_rs485_mode() to ensure the
PM domain list is detached before exiting.

Fixes: 86fa39dd6fb7 ("serial: qcom-geni: Enable Serial on SA8255p Qualcomm platforms")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Anup Kulkarni <anup.kulkarni@xxxxxxxxxxxxxxxx>
---
drivers/tty/serial/qcom_geni_serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 9c7b1cea7cfe..0fc0f215b85c 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1928,7 +1928,7 @@ static int qcom_geni_serial_probe(struct platform_device *pdev)

ret = uart_get_rs485_mode(uport);
if (ret)
- return ret;
+ goto error;

devm_pm_runtime_enable(port->se.dev);

--
2.34.1