diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-06-16 18:31:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-01 15:35:46 -0700 |
commit | 7c365bac4437887382d53be2f735b34634d68c3b (patch) | |
tree | 7211484831a2ad2c67ef8de187d1e75ae0fa4cc6 /drivers/tty | |
parent | 5a3c6b251d587715f8b87a50216e4c085c655777 (diff) | |
download | linux-7c365bac4437887382d53be2f735b34634d68c3b.tar.gz linux-7c365bac4437887382d53be2f735b34634d68c3b.tar.bz2 linux-7c365bac4437887382d53be2f735b34634d68c3b.zip |
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: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/bfin_5xx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/bfin_5xx.c b/drivers/tty/serial/bfin_5xx.c index 9b1ff2b6bb37..957135a19743 100644 --- a/drivers/tty/serial/bfin_5xx.c +++ b/drivers/tty/serial/bfin_5xx.c @@ -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; |