Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Linus Walleij
08b89fa2 a7ce8353

+1 -1
+1 -1
drivers/gpio/gpio-tz1090.c
··· 573 573 574 574 /* Ioremap the registers */ 575 575 priv.reg = devm_ioremap(&pdev->dev, res_regs->start, 576 - res_regs->end - res_regs->start); 576 + resource_size(res_regs)); 577 577 if (!priv.reg) { 578 578 dev_err(&pdev->dev, "unable to ioremap registers\n"); 579 579 return -ENOMEM;