mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 08:02:27 +02:00
usb: ehci-s5p: fix memleak when fallback to pdata
When devm_usb_get_phy fail, we should free hcd Signed-off-by: Libo Chen <libo.chen@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4746b6c6ef
commit
9a9ef7360e
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user