Skip to content

Commit

Permalink
serial: bfin_5xx: fix off-by-one with resource size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mike Frysinger authored and Greg Kroah-Hartman committed Jul 1, 2011
1 parent 5a3c6b2 commit 7c365ba
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/tty/serial/bfin_5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c365ba

Please sign in to comment.