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

Commit 08b89fa2 authored by Axel Lin's avatar Axel Lin Committed by Linus Walleij
Browse files

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



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

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarJames Hogan <james.hogan@imgtec.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent a7ce8353
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;