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

Commit e3396b26 authored by Dan Carpenter's avatar Dan Carpenter Committed by Eric Miao
Browse files

pxa168fb: fix incorrect resource calculation



The size calculation is not correct.  It should be end - start + 1.
Use resource_size() to caculate it.

Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
parent fe3ebaad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -668,7 +668,7 @@ static int __init pxa168fb_probe(struct platform_device *pdev)
	/*
	 * Map LCD controller registers.
	 */
	fbi->reg_base = ioremap_nocache(res->start, res->end - res->start);
	fbi->reg_base = ioremap_nocache(res->start, resource_size(res));
	if (fbi->reg_base == NULL) {
		ret = -ENOMEM;
		goto failed;