提交 7c365bac 编写于 作者: M Mike Frysinger 提交者: Greg Kroah-Hartman

serial: bfin_5xx: fix off-by-one with resource size

This doesn't cause any real bugs, but it should still be fixed.
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 5a3c6b25
......@@ -1304,8 +1304,7 @@ static int bfin_serial_probe(struct platform_device *pdev)
goto out_error_free_peripherals;
}
uart->port.membase = ioremap(res->start,
res->end - res->start);
uart->port.membase = ioremap(res->start, resource_size(res));
if (!uart->port.membase) {
dev_err(&pdev->dev, "Cannot map uart IO\n");
ret = -ENXIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册