[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211130143354.1820111-1-mudongliangabcd@gmail.com>
Date: Tue, 30 Nov 2021 22:33:53 +0800
From: Dongliang Mu <mudongliangabcd@...il.com>
To: Al Cooper <alcooperx@...il.com>, Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Dongliang Mu <mudongliangabcd@...il.com>,
linux-usb@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...il.com>
---
drivers/usb/gadget/udc/bdc/bdc_core.c | 1 +
1 file changed, 1 insertion(+)
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;
}
--
2.25.1
Powered by blists - more mailing lists