usb: misc: onboard_usb_hub: Disable the USB hub clock on failure
Subsystems (2)
PATCH 1/1 usb: misc: onboard_usb_hub: Disable the USB hub clock on failure
From: Fabio Estevam <[email protected]>
In case regulator_bulk_enable() fails, the previously enabled USB hub clock should be disabled.
Fix it accordingly.
--- drivers/usb/misc/onboard_usb_dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/usb/misc/onboard_usb_dev.c +5 -1
@@ -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)
Signature · 1 line
2.34.1
Quoted 9 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
In case
regulator_bulk_enable()fails, the previously enabled USB hub clock should be disabled.Fix it accordingly.
Fixes 65e62b8a955a ("usb: misc: onboard_usb_hub: Add support for clock input")Signed-off-by Fabio Estevam <[email protected]>
Oops, sorry. I totally missed that when I was porting the patch from a downstream tree that didn't have the regulator code path.
Thanks for fixing!
Quoted 28 lines
--- drivers/usb/misc/onboard_usb_dev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/usb/misc/onboard_usb_dev.c +5
-1@@ -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)
Quoted 10 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
In case
regulator_bulk_enable()fails, the previously enabled USB hub clock should be disabled.Fix it accordingly.
Fixes 65e62b8a955a ("usb: misc: onboard_usb_hub: Add support for clock input")Signed-off-by Fabio Estevam <[email protected]>
Greg KH
maintainerQuoted 11 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
In case
regulator_bulk_enable()fails, the previously enabled USB hub clock should be disabled.Fix it accordingly.
Fixes 65e62b8a955a ("usb: misc: onboard_usb_hub: Add support for clock input")Signed-off-by Fabio Estevam <[email protected]>--- drivers/usb/misc/onboard_usb_dev.c | 6 +++++-
This file is not in the tree for 6.9-rc2, can you please fix this up and resend?
thanks,
greg k-h
Matthias Kaehlcke
maintainerQuoted 9 lines · Greg KH
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
In case
regulator_bulk_enable()fails, the previously enabled USB hub clock should be disabled.Fix it accordingly.
Quoted 7 lines
Quoted 4 lines
Fixes 65e62b8a955a ("usb: misc: onboard_usb_hub: Add support for clock input")Signed-off-by Fabio Estevam <[email protected]>--- drivers/usb/misc/onboard_usb_dev.c | 6 +++++-This file is not in the tree for 6.9-rc2, can you please fix this up and resend?
The driver has been renamed in usb-next. Shouldn't this patch be based on usb-next and the backports to stable kernels account for the name change? v6.9 sits a bit in between, since there is no stable branch yet. The fix doesn't seem super-critical, I guess it would be ok to leave v6.9 as is for now and add the fix once there is a stable branch for it.
Greg KH
maintainerQuoted 15 lines · Matthias Kaehlcke
Quoted 14 lines · Greg KH
Quoted 11 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
In case
regulator_bulk_enable()fails, the previously enabled USB hub clock should be disabled.Fix it accordingly.
Fixes 65e62b8a955a ("usb: misc: onboard_usb_hub: Add support for clock input")Signed-off-by Fabio Estevam <[email protected]>--- drivers/usb/misc/onboard_usb_dev.c | 6 +++++-
Quoted 6 lines
Quoted 2 lines
This file is not in the tree for 6.9-rc2, can you please fix this up and resend?
The driver has been renamed in usb-next. Shouldn't this patch be based on usb-next and the backports to stable kernels account for the name change?
If you want to wait a few weeks for this fix to get in, sure. Otherwise no.
thanks,
greg k-h