提交 08b89fa2 编写于 作者: A Axel Lin 提交者: Linus Walleij

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

Use resource_size to fix off-by-one resource size calculation
Signed-off-by: NAxel Lin <axel.lin@ingics.com>
Acked-by: NJames Hogan <james.hogan@imgtec.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 a7ce8353
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册