asoc: wcd-dsp-mgr: clear work queue for wcd dsp manager

wdsp_mgr_bind would schedule work to load wdsp firmware.
Before loading wdsp firmware, sound card registeration may fail.
wcd_dsp_cntl_deinit would get called to free cntl which would be used
in wdsp_load_fw_image which would cause kernel panic.
Clear work queue in wdsp_mgr_unbind to avoid kernel panic.

Change-Id: I6c052fa8ea1ff62a8b075ba191085612242a5005
Signed-off-by: Meng Wang <mwang@codeaurora.org>
This commit is contained in:
Meng Wang
2018-03-23 14:20:47 +08:00
committed by Gerrit - the friendly Code Review server
parent 5ee446ca78
commit 9836489e23

View File

@@ -1091,6 +1091,8 @@ static void wdsp_mgr_unbind(struct device *dev)
struct wdsp_cmpnt *cmpnt; struct wdsp_cmpnt *cmpnt;
int idx; int idx;
cancel_work_sync(&wdsp->load_fw_work);
component_unbind_all(dev, wdsp->ops); component_unbind_all(dev, wdsp->ops);
wdsp_mgr_debugfs_remove(wdsp); wdsp_mgr_debugfs_remove(wdsp);