* Patch "usb: dwc3: of-simple: fix missing clk_disable_unprepare" has been added to the 4.9-stable tree
@ 2018-02-23 10:59 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2018-02-23 10:59 UTC (permalink / raw)
To: andreas.platschek, alexander.levin, felipe.balbi, gregkh
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
usb: dwc3: of-simple: fix missing clk_disable_unprepare
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
usb-dwc3-of-simple-fix-missing-clk_disable_unprepare.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From foo@baz Fri Feb 23 11:48:40 CET 2018
From: Andreas Platschek <andreas.platschek@opentech.at>
Date: Thu, 7 Dec 2017 11:32:20 +0100
Subject: usb: dwc3: of-simple: fix missing clk_disable_unprepare
From: Andreas Platschek <andreas.platschek@opentech.at>
[ Upstream commit ded600ea9fb51a495d2fcd21e90351df876488e8 ]
If of_clk_get() fails, the clean-up of already initialized clocks should be
the same as when clk_prepare_enable() fails. Thus a clk_disable_unprepare()
for each clock should be called before the clk_put().
Found by Linux Driver Verification project (linuxtesting.org).
Fixes: 16adc674d0d6 ("usb: dwc3: ep0: fix setup_packet_pending initialization")
Signed-off-by: Andreas Platschek <andreas.platschek@opentech.at>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/usb/dwc3/dwc3-of-simple.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -58,8 +58,10 @@ static int dwc3_of_simple_clk_init(struc
clk = of_clk_get(np, i);
if (IS_ERR(clk)) {
- while (--i >= 0)
+ while (--i >= 0) {
+ clk_disable_unprepare(simple->clks[i]);
clk_put(simple->clks[i]);
+ }
return PTR_ERR(clk);
}
Patches currently in stable-queue which might be from andreas.platschek@opentech.at are
queue-4.9/usb-dwc3-of-simple-fix-missing-clk_disable_unprepare.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-02-23 11:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-23 10:59 Patch "usb: dwc3: of-simple: fix missing clk_disable_unprepare" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox