From: Libo Chen Date: Thu, 9 May 2013 04:58:09 +0000 (+0800) Subject: usb: isp1760-if: fix memleak when platform_get_resource fail X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=72d9c8b68d013133b296ad8e63a30fb257351484;p=linux-beck.git usb: isp1760-if: fix memleak when platform_get_resource fail When platform_get_resource fail, we should release_mem_region Signed-off-by: Libo Chen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index bbb791bd7617..a13709ee4e5d 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c @@ -373,8 +373,10 @@ static int isp1760_plat_probe(struct platform_device *pdev) irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!irq_res) { pr_warning("isp1760: IRQ resource not available\n"); - return -ENODEV; + ret = -ENODEV; + goto cleanup; } + irqflags |= irq_res->flags & IRQF_TRIGGER_MASK; if (priv) {