Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9a9ef736 authored by Libo Chen's avatar Libo Chen Committed by Greg Kroah-Hartman
Browse files

usb: ehci-s5p: fix memleak when fallback to pdata



When devm_usb_get_phy fail, we should free hcd

Signed-off-by: default avatarLibo Chen <libo.chen@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4746b6c6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 {