Browse Source

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 <[email protected]>
Meng Wang 7 years ago
parent
commit
9836489e23
1 changed files with 2 additions and 0 deletions
  1. 2 0
      asoc/codecs/wcd-dsp-mgr.c

+ 2 - 0
asoc/codecs/wcd-dsp-mgr.c

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