ASoC: msm: qdsp6: Print message only when string is not NULL
Solve the crash which may be caused by NULL name in
voc_get_session_id function.
CRs-fixed: 310289
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
diff --git a/sound/soc/msm/qdsp6/q6voice.c b/sound/soc/msm/qdsp6/q6voice.c
index b287c70..ecfef5b 100644
--- a/sound/soc/msm/qdsp6/q6voice.c
+++ b/sound/soc/msm/qdsp6/q6voice.c
@@ -137,9 +137,10 @@
session_id = common.voice[VOC_PATH_PASSIVE].session_id;
else
session_id = common.voice[VOC_PATH_FULL].session_id;
- }
- pr_debug("%s: %s has session id 0x%x\n", __func__, name, session_id);
+ pr_debug("%s: %s has session id 0x%x\n", __func__, name,
+ session_id);
+ }
return session_id;
}