Skip to content

Commit

Permalink
usb: r8a66597-hcd: fix up error path.
Browse files Browse the repository at this point in the history
Currently when registration fails we're left with a stray reference to
release_mem_region(), this leads to the following case:

    r8a66597_hcd r8a66597_hcd: irq 13, io base 0x18040000
    drivers/usb/host/r8a66597-hcd.c: register access fail.
    r8a66597_hcd r8a66597_hcd: startup error -6
    r8a66597_hcd r8a66597_hcd: USB bus 1 deregistered
    drivers/usb/host/r8a66597-hcd.c: Failed to add hcd
    Trying to free nonexistent resource <0000000018040000-0000000018040000>

This fixes it up.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Paul Mundt authored and Greg Kroah-Hartman committed Aug 22, 2007
1 parent a3b5351 commit 71ee9a6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/usb/host/r8a66597-hcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2208,8 +2208,6 @@ static int __init r8a66597_probe(struct platform_device *pdev)
clean_up:
if (reg)
iounmap(reg);
if (res)
release_mem_region(res->start, 1);

return ret;
}
Expand Down

0 comments on commit 71ee9a6

Please sign in to comment.