Skip to contentSkip to conversation

gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation

PATCH RESEND In review Axel Lin 2 participants 2 messages Jan 21, 2015 – Jan 29, 2015 GPIO

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND 1/1 gpio: tz1090-pdc: Use resource_size to fix off-by-one resource size calculation

---
Hi Linus,
Seems this one was missed.
Thanks,
Axel

 drivers/gpio/gpio-tz1090-pdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-tz1090-pdc.c +1 -1
index d753622..ede7e40 100644
@@ -190,7 +190,7 @@ static int tz1090_pdc_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;
Signature · 1 line
1.9.1