diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2023-06-04 17:56:34 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-06-13 12:56:34 +0300 |
commit | 4a944da707123686d372ec01ea60056902fadf35 (patch) | |
tree | 3e7d71baab3847d39d411d5cf598d15433afd2de /drivers/usb/dwc3 | |
parent | 8fd95da2cfb5046c4bb5a3cdc9eb7963ba8b10dd (diff) | |
download | linux-4a944da707123686d372ec01ea60056902fadf35.tar.xz |
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: c25c210f590e ("usb: dwc3: qcom: add URS Host support for sdm845 ACPI boot")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Andrew Halaney <ahalaney@redhat.com>
Message-ID: <b69fa8dd68d816e7d24c88d3eda776ceb28c5dc5.1685890571.git.christophe.jaillet@wanadoo.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/dwc3-qcom.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/dwc3-qcom.c b/drivers/usb/dwc3/dwc3-qcom.c index ad90e1ce39ad..9c95f1d909ba 100644 --- a/drivers/usb/dwc3/dwc3-qcom.c +++ b/drivers/usb/dwc3/dwc3-qcom.c @@ -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; } } } |