提交 896e5188 编写于 作者: J Johan Hovold 提交者: Felipe Balbi

usb: dwc3: of-simple: fix use-after-free on remove

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: 16adc674 ("usb: dwc3: add generic OF glue layer")
Signed-off-by: NJohan Hovold <johan@kernel.org>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 1ffba905
......@@ -165,8 +165,9 @@ static int dwc3_of_simple_remove(struct platform_device *pdev)
reset_control_put(simple->resets);
pm_runtime_put_sync(dev);
pm_runtime_disable(dev);
pm_runtime_put_noidle(dev);
pm_runtime_set_suspended(dev);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册