mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 15:13:44 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0fc924bd4e
commit
a72e2e5cc2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user