ASoC: codecs: wcd: avoid redundant component unbind
Component unbind happens in component_bind_all, if component
bind fails. There is no need to call extra component_unbind_all.
Change-Id: I4ff2aececc5e10c5c4cfbe71778630c621768349
Signed-off-by: Xiaojun Sang <xsang@codeaurora.org>
diff --git a/asoc/codecs/wcd-dsp-mgr.c b/asoc/codecs/wcd-dsp-mgr.c
index 9bcb635..9e65deb 100644
--- a/asoc/codecs/wcd-dsp-mgr.c
+++ b/asoc/codecs/wcd-dsp-mgr.c
@@ -1059,8 +1059,10 @@
dev_info(dev, "%s: create_ramdump_device failed\n", __func__);
ret = component_bind_all(dev, wdsp->ops);
- if (ret < 0)
+ if (ret < 0) {
WDSP_ERR(wdsp, "component_bind_all failed %d\n", ret);
+ return ret;
+ }
/* Make sure all components registered ops */
for (idx = 0; idx < WDSP_CMPNT_TYPE_MAX; idx++) {