diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2020-03-26 14:44:57 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-05-05 11:00:12 +0300 |
commit | 8f5bc1ec770c2bdc8c604ba4119a77d81d8f3529 (patch) | |
tree | 8b3e354c640c6c2507fb34bc76b3acbd095b643e /drivers/usb | |
parent | 6d9fa35a347a8789aefa8f4dc7aab9d006e8ed4e (diff) |
usb: dwc3: meson-g12a: check return of dwc3_meson_g12a_usb_init
The dwc3_meson_g12a_usb_init function can return an error, check it.
Fixes: c99993376f72ca ("usb: dwc3: Add Amlogic G12A DWC3 glue")
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/dwc3/dwc3-meson-g12a.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/dwc3/dwc3-meson-g12a.c b/drivers/usb/dwc3/dwc3-meson-g12a.c index 4be3ab6099ed..63510125d42e 100644 --- a/drivers/usb/dwc3/dwc3-meson-g12a.c +++ b/drivers/usb/dwc3/dwc3-meson-g12a.c @@ -590,7 +590,9 @@ static int dwc3_meson_g12a_probe(struct platform_device *pdev) /* Get dr_mode */ priv->otg_mode = usb_get_dr_mode(dev); - dwc3_meson_g12a_usb_init(priv); + ret = dwc3_meson_g12a_usb_init(priv); + if (ret) + goto err_disable_clks; /* Init PHYs */ for (i = 0 ; i < PHY_COUNT ; ++i) { |