Skip to content

Commit

Permalink
usb: ehci-s5p: fix memleak when fallback to pdata
Browse files Browse the repository at this point in the history
When devm_usb_get_phy fail, we should free hcd

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 Greg Kroah-Hartman committed May 17, 2013
1 parent 4746b6c commit 9a9ef73
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/host/ehci-s5p.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ static int s5p_ehci_probe(struct platform_device *pdev)
if (IS_ERR(phy)) {
/* Fallback to pdata */
if (!pdata) {
usb_put_hcd(hcd);
dev_warn(&pdev->dev, "no platform data or transceiver defined\n");
return -EPROBE_DEFER;
} else {
Expand Down

0 comments on commit 9a9ef73

Please sign in to comment.