summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorLibo Chen <chenlibo.3@gmail.com>2013-05-09 04:58:08 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-17 00:35:13 (GMT)
commit9a9ef7360e601cbe4c978742c115645e67bd6e25 (patch)
tree5dff9bba5ce0d3040a3f72f439575f14611ef886 /drivers/usb/host
parent4746b6c6efcdc3f5ef84f0bc2c39707c6b4e5e24 (diff)
downloadlinux-9a9ef7360e601cbe4c978742c115645e67bd6e25.tar.xz
usb: ehci-s5p: fix memleak when fallback to pdata
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>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-s5p.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index a81465e..379037f 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -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 {