[PATCH 14/24] serial: 8250: ioc3: store registered line number in driver data
From: Greg Kroah-Hartman
Date: Tue Oct 27 2026 - 07:13:02 EST
From: Joshua Rogers <linux@xxxxxxxxx>
The registered line number returned by serial8250_register_8250_port()
was stored only in the local variable 'line' and never saved into
data->line, causing the remove path to always unregister line 0
instead of the correct port.
Cc: Jiri Slaby <jirislaby@xxxxxxxxxx>
Cc: stable <stable@xxxxxxxxxx>
Signed-off-by: Joshua Rogers <linux@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/tty/serial/8250/8250_ioc3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/tty/serial/8250/8250_ioc3.c b/drivers/tty/serial/8250/8250_ioc3.c
index 088242de2eff..3ab50e04be45 100644
--- a/drivers/tty/serial/8250/8250_ioc3.c
+++ b/drivers/tty/serial/8250/8250_ioc3.c
@@ -63,6 +63,7 @@ static int serial8250_ioc3_probe(struct platform_device *pdev)
if (IS_ERR(uport))
return PTR_ERR(uport);
+ data->line = line;
platform_set_drvdata(pdev, uport);
return 0;
}
--
2.56.0