Skip to content

Commit

Permalink
USB: ohci-sm501: add iounmap on error path
Browse files Browse the repository at this point in the history
This ioremap() was leaked on an error path.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Oct 22, 2010
1 parent 5c8db07 commit 637ed74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/host/ohci-sm501.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,16 @@ static int ohci_hcd_sm501_drv_probe(struct platform_device *pdev)

retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
if (retval)
goto err4;
goto err5;

/* enable power and unmask interrupts */

sm501_unit_power(dev->parent, SM501_GATE_USB_HOST, 1);
sm501_modify_reg(dev->parent, SM501_IRQ_MASK, 1 << 6, 0);

return 0;
err5:
iounmap(hcd->regs);
err4:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err3:
Expand Down

0 comments on commit 637ed74

Please sign in to comment.