From: Jingoo Han Date: Thu, 10 Oct 2013 01:02:38 +0000 (+0900) Subject: USB: ohci-exynos: Add missing usb_put_hcd() to prevent memory leak X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=a72e2e5cc2e74ed793a0651e072a8529cfb93631;p=deliverable%2Flinux.git 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 Signed-off-by: Greg Kroah-Hartman --- 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 {