]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
irqchip/imgpdc: Use resource_size function on resource object
authorVasyl Gomonovych <gomonovych@gmail.com>
Mon, 20 Nov 2017 22:02:41 +0000 (23:02 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 23 Nov 2017 19:09:12 +0000 (20:09 +0100)
drivers/irqchip/irq-imgpdc.c:327:20-23: WARNING: Suspicious code.
resource_size is maybe missing with res_regs

Generated by: scripts/coccinelle/api/resource_size.cocci

Signed-off-by: Vasyl Gomonovych <gomonovych@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: marc.zyngier@arm.com
Cc: jason@lakedaemon.net
Link: https://lkml.kernel.org/r/1511215361-8279-1-git-send-email-gomonovych@gmail.com
drivers/irqchip/irq-imgpdc.c

index 1f59998e03f806e72ad48434885192ffacf98c70..e80263e16c4c8fe37f7fca956523d1a810567931 100644 (file)
@@ -325,7 +325,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
 
        /* Ioremap the registers */
        priv->pdc_base = devm_ioremap(&pdev->dev, res_regs->start,
-                                     res_regs->end - res_regs->start);
+                                     resource_size(res_regs));
        if (!priv->pdc_base)
                return -EIO;