diff options
author | Libo Chen <chenlibo.3@gmail.com> | 2013-05-09 00:58:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-16 20:35:13 -0400 |
commit | 9a9ef7360e601cbe4c978742c115645e67bd6e25 (patch) | |
tree | 5dff9bba5ce0d3040a3f72f439575f14611ef886 /drivers/usb/host/ehci-s5p.c | |
parent | 4746b6c6efcdc3f5ef84f0bc2c39707c6b4e5e24 (diff) |
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/ehci-s5p.c')
-rw-r--r-- | drivers/usb/host/ehci-s5p.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c index a81465ed48db..379037f51a2f 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) | |||
105 | if (IS_ERR(phy)) { | 105 | if (IS_ERR(phy)) { |
106 | /* Fallback to pdata */ | 106 | /* Fallback to pdata */ |
107 | if (!pdata) { | 107 | if (!pdata) { |
108 | usb_put_hcd(hcd); | ||
108 | dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); | 109 | dev_warn(&pdev->dev, "no platform data or transceiver defined\n"); |
109 | return -EPROBE_DEFER; | 110 | return -EPROBE_DEFER; |
110 | } else { | 111 | } else { |