* [PATCH] serial: mxs-auart: Use devm_ioremap() to fix the missing undo bug
@ 2020-06-06 14:40 Chuhong Yuan
0 siblings, 0 replies; only message in thread
From: Chuhong Yuan @ 2020-06-06 14:40 UTC (permalink / raw)
Cc: Greg Kroah-Hartman, Jiri Slaby, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
linux-serial, linux-arm-kernel, linux-kernel, Chuhong Yuan
This driver calls ioremap() in probe, but it misses calling iounmap() in
probe's error handler and remove.
Replace ioremap() with the devm version to fix it.
Fixes: 47d37d6f94cc ("serial: Add auart driver for i.MX23/28")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
---
drivers/tty/serial/mxs-auart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index b4f835e7de23..b3e16fd72eaf 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -1679,7 +1679,7 @@ static int mxs_auart_probe(struct platform_device *pdev)
}
s->port.mapbase = r->start;
- s->port.membase = ioremap(r->start, resource_size(r));
+ s->port.membase = devm_ioremap(&pdev->dev, r->start, resource_size(r));
if (!s->port.membase) {
ret = -ENOMEM;
goto out_disable_clks;
--
2.26.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-06 14:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-06 14:40 [PATCH] serial: mxs-auart: Use devm_ioremap() to fix the missing undo bug Chuhong Yuan
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®