pxa168fb: use resource_size()
Subsystems (2)
PATCH 1/1 pxa168fb: use resource_size()
The size calculation is not correct. It should be end - start + 1. Use resource_size() to caculate it.
Signed-off-by Dan Carpenter <[email protected]>
---
This was found by a static checker and I don't have the hardware to test it. Please review carefully.
drivers/video/pxa168fb.c +1 -1
@@ -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;
Quoted 4 lines · Dan Carpenter
The size calculation is not correct. Â It should be end - start + 1. Use
resource_size()to caculate it.Signed-off-by Dan Carpenter <[email protected]>
Applied to 'fix'.
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html