1
0
Fork 0

gpio: tz1090: Use resource_size to fix off-by-one

Use resource_size to fix off-by-one resource size calculation

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
hifive-unleashed-5.1
Axel Lin 2014-12-28 14:00:39 +08:00 committed by Linus Walleij
parent a7ce835376
commit 08b89fa20b
1 changed files with 1 additions and 1 deletions

View File

@ -573,7 +573,7 @@ static int tz1090_gpio_probe(struct platform_device *pdev)
/* Ioremap the registers */
priv.reg = devm_ioremap(&pdev->dev, res_regs->start,
res_regs->end - res_regs->start);
resource_size(res_regs));
if (!priv.reg) {
dev_err(&pdev->dev, "unable to ioremap registers\n");
return -ENOMEM;