Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e114474c authored by Tobias Klauser's avatar Tobias Klauser Committed by Greg Kroah-Hartman
Browse files

serial: bfin_sport_uart: Use resource size to fix off-by-one error



Use the resource_size function instead of manually calculating the
resource size. This actually fixes an off-by-one error.

Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ccc5ca8d
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -774,8 +774,7 @@ static int __devinit sport_uart_probe(struct platform_device *pdev)
			goto out_error_free_peripherals;
		}

		sport->port.membase = ioremap(res->start,
			res->end - res->start);
		sport->port.membase = ioremap(res->start, resource_size(res));
		if (!sport->port.membase) {
			dev_err(&pdev->dev, "Cannot map sport IO\n");
			ret = -ENXIO;