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>
This commit is contained in:
Libo Chen 2013-05-09 12:58:09 +08:00 committed by Greg Kroah-Hartman
parent 9a9ef7360e
commit 72d9c8b68d

View File

@ -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) {