summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-exynos.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-10-10 10:02:38 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-11 16:31:15 -0700
commita72e2e5cc2e74ed793a0651e072a8529cfb93631 (patch)
treeaaeba1713699bafc4592feec5aa3e43aed2a3068 /drivers/usb/host/ohci-exynos.c
parent0fc924bd4eecc45f05cc8437c28a8f33f9c45d3b (diff)
downloadlinux-a72e2e5cc2e74ed793a0651e072a8529cfb93631.tar.gz
linux-a72e2e5cc2e74ed793a0651e072a8529cfb93631.tar.bz2
linux-a72e2e5cc2e74ed793a0651e072a8529cfb93631.zip
USB: ohci-exynos: Add missing usb_put_hcd() to prevent memory leak
When devm_usb_get_phy() fails, usb_put_hcd() should be called to prevent memory leak. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ohci-exynos.c')
-rw-r--r--drivers/usb/host/ohci-exynos.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/host/ohci-exynos.c b/drivers/usb/host/ohci-exynos.c
index f5f372e02a99..122e52e88a40 100644
--- a/drivers/usb/host/ohci-exynos.c
+++ b/drivers/usb/host/ohci-exynos.c
@@ -100,6 +100,7 @@ static int exynos_ohci_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 {