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>
This commit is contained in:
parent
554abfe2ea
commit
e1c72d907f
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user