提交 a72e2e5c 编写于 作者: J Jingoo Han 提交者: Greg Kroah-Hartman

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: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0fc924bd
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册