summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLibo Chen <chenlibo.3@gmail.com>2013-05-09 12:58:09 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-16 17:35:13 -0700
commit72d9c8b68d013133b296ad8e63a30fb257351484 (patch)
tree33909da7d02bb412395372d8a78501a2f9cc6fd2 /drivers/usb
parent9a9ef7360e601cbe4c978742c115645e67bd6e25 (diff)
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 <libo.chen@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/isp1760-if.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index bbb791bd761..a13709ee4e5 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) {