diff options
author | Dongliang Mu <mudongliangabcd@gmail.com> | 2021-11-30 17:33:53 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-03 15:50:43 +0300 |
commit | e1c72d907f4c3f4f859f0c5890d5326d804625dc (patch) | |
tree | cf8b05b9aee528ace8241b82efbdfd3cffd08ac9 /drivers/usb/gadget | |
parent | 554abfe2eadec97d12c71d4a69da1518478f69eb (diff) |
usb: bdc: fix error handling code in bdc_resume
If bdc_reinit in bdc_resume fails, it forgets to deallocate the
bdc->clk.
Fix this by adding clk_disable_unprepare(bdc->clk).
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Link: https://lore.kernel.org/r/20211130143354.1820111-1-mudongliangabcd@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/bdc/bdc_core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index fa1a3908ec3b..9849e0c86e23 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_core.c +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c @@ -623,6 +623,7 @@ static int bdc_resume(struct device *dev) ret = bdc_reinit(bdc); if (ret) { dev_err(bdc->dev, "err in bdc reinit\n"); + clk_disable_unprepare(bdc->clk); return ret; } |