]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc3: of-simple: fix missing clk_disable_unprepare
authorAndreas Platschek <andreas.platschek@opentech.at>
Thu, 7 Dec 2017 10:32:20 +0000 (11:32 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 11 Dec 2017 10:35:36 +0000 (12:35 +0200)
commit222dc42c393193d2ff7455ee2e61b25ad5922f6a
tree7826e796c47843abae79921d939914a5cde783b0
parent3c3221b1959c816f907c3d66fdc4aa8e77c87b0d
usb: dwc3: of-simple: fix missing clk_disable_unprepare

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: 8788837c2ef5 ("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>
drivers/usb/dwc3/dwc3-of-simple.c