diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2024-04-24 09:12:02 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-04-30 19:11:13 +0300 |
commit | 32965a3b827581a4cd2c7046ac7809df3579a678 (patch) | |
tree | dc9a2143e351e317577916bb6954102986451847 /drivers/usb | |
parent | 3f12222a4bebeb13ce06ddecc1610ad32fa835dd (diff) | |
download | linux-32965a3b827581a4cd2c7046ac7809df3579a678.tar.xz |
USB: fix up for "usb: misc: onboard_hub: rename to onboard_dev"
interacting with "usb: misc: onboard_usb_hub: Disable the USB hub clock
on failure"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Link: https://lore.kernel.org/r/20240424161202.7e45e19e@canb.auug.org.au
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/onboard_usb_dev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/misc/onboard_usb_dev.c b/drivers/usb/misc/onboard_usb_dev.c index 648ea933bdad..f2bcc1a8b95f 100644 --- a/drivers/usb/misc/onboard_usb_dev.c +++ b/drivers/usb/misc/onboard_usb_dev.c @@ -93,7 +93,7 @@ static int onboard_dev_power_on(struct onboard_dev *onboard_dev) if (err) { dev_err(onboard_dev->dev, "failed to enable supplies: %pe\n", ERR_PTR(err)); - return err; + goto disable_clk; } fsleep(onboard_dev->pdata->reset_us); @@ -102,6 +102,10 @@ static int onboard_dev_power_on(struct onboard_dev *onboard_dev) onboard_dev->is_powered_on = true; return 0; + +disable_clk: + clk_disable_unprepare(onboard_dev->clk); + return err; } static int onboard_dev_power_off(struct onboard_dev *onboard_dev) |