usb: dwc3: of-simple: fix use-after-free on remove
authorJohan Hovold <johan@kernel.org>
Thu, 31 May 2018 14:45:52 +0000 (16:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:08:57 +0000 (13:08 +0200)
commit987a7dab8308be0636b020444bd42910abf68dbc
treefb37f1408c3cf9e8a1d60291c50d4ebf2739b1e9
parent7b2dc4515f030658f9cae3f1d7e294ab8238e39f
usb: dwc3: of-simple: fix use-after-free on remove

[ Upstream commit 896e518883f18e601335908192e33426c1f599a4 ]

The clocks have already been explicitly disabled and put as part of
remove() so the runtime suspend callback must not be run when balancing
the runtime PM usage count before returning.

Fixes: 16adc674d0d6 ("usb: dwc3: add generic OF glue layer")
Signed-off-by: Johan Hovold <johan@kernel.org>
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