lkml.org 
[lkml]   [2020]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] serial: mxs-auart: Use devm_ioremap() to fix the missing undo bug
Date
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
\
 
 \ /
  Last update: 2020-06-06 16:40    [W:0.025 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site