Commit 4a944da7 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Greg Kroah-Hartman

usb: dwc3: qcom: Fix an error handling path in dwc3_qcom_probe()

If dwc3_qcom_create_urs_usb_platdev() fails, some resources still need to
be released, as already done in the other error handling path of the
probe.

Fixes: c25c210f ("usb: dwc3: qcom: add URS Host support for sdm845 ACPI boot")
Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarAndrew Halaney <ahalaney@redhat.com>
Message-ID: <b69fa8dd68d816e7d24c88d3eda776ceb28c5dc5.1685890571.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8fd95da2
......@@ -856,9 +856,10 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
if (IS_ERR_OR_NULL(qcom->urs_usb)) {
dev_err(dev, "failed to create URS USB platdev\n");
if (!qcom->urs_usb)
return -ENODEV;
ret = -ENODEV;
else
return PTR_ERR(qcom->urs_usb);
ret = PTR_ERR(qcom->urs_usb);
goto clk_disable;
}
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment