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>
This commit is contained in:
Helen Zeng
2011-09-29 14:25:43 -07:00
committed by Bryan Huntsman
parent e17a2ddc10
commit 0f4c4e2dca

View File

@@ -137,9 +137,10 @@ uint16_t voc_get_session_id(char *name)
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;
}