提交 9a9ef736 编写于 作者: L Libo Chen 提交者: Greg Kroah-Hartman

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

When devm_usb_get_phy fail, we should free hcd
Signed-off-by: NLibo Chen <libo.chen@huawei.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 4746b6c6
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册