mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] serial: ma35d1: unmap MMIO on remove
@ 2026-09-24 11:04 Guangshuo Li
  2026-10-01  8:41 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Guangshuo Li @ 2026-09-24 11:04 UTC (permalink / raw)
  To: ychuang3, schung, gregkh, jirislaby
  Cc: linux-arm-kernel, linux-kernel, linux-serial, ilpo.jarvinen,
	lgs201920130244

ma35d1serial_probe() maps up->port.membase with ioremap(), but
ma35d1serial_remove() does not perform the matching iounmap(). The probe
error path already releases this mapping after disabling the clock.

Add iounmap() to the remove path after clk_disable_unprepare() to match
the resource cleanup order used by ma35d1serial_probe().

Fixes: 930cbf92db01 ("tty: serial: Add Nuvoton ma35d1 serial driver support")
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
---
 drivers/tty/serial/ma35d1_serial.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/serial/ma35d1_serial.c b/drivers/tty/serial/ma35d1_serial.c
index 920fe7ff5083..e5eaaf154911 100644
--- a/drivers/tty/serial/ma35d1_serial.c
+++ b/drivers/tty/serial/ma35d1_serial.c
@@ -770,6 +770,7 @@ static void ma35d1serial_remove(struct platform_device *dev)
 
 	uart_remove_one_port(&ma35d1serial_reg, port);
 	clk_disable_unprepare(up->clk);
+	iounmap(up->port.membase);
 }
 
 static int ma35d1serial_suspend(struct platform_device *dev, pm_message_t state)

base-commit: f03c39de3a1307371a4032757cd1732e91087c7d
-- 
2.43.0


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

end of thread, other threads:[~2026-10-01  8:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-24 11:04 [PATCH] serial: ma35d1: unmap MMIO on remove Guangshuo Li
2026-10-01  8:41 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®