Skip to content

Commit

Permalink
usb: isp1760-if: fix memleak when platform_get_resource fail
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Libo Chen authored and gregkh committed May 17, 2013
1 parent 9a9ef73 commit 72d9c8b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/host/isp1760-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 72d9c8b

Please sign in to comment.