Skip to content
Snippets Groups Projects
Commit 55fbb0ef authored by Bhalchandra Gajare's avatar Bhalchandra Gajare Committed by Iliyan Malchev
Browse files

ASoC: wcd_cpe_core: Fix handling of CPE SSR event


It is possible that CPE block on the codec might not be enabled and SSR
event is triggerred, in such cases the CPE is not initialized and the
core handle to CPE is expected to be NULL. Fix the CPE SSR handling to
make sure SSR handling does not proceed if the core handle is NULL.

CRs-fixed: 698888
Change-Id: Ie525568765d5fb2a0bc0bf33c6da2a5d1b713d20
Signed-off-by: default avatarBhalchandra Gajare <gajare@codeaurora.org>
parent d88d0dfc
Branches
Tags
No related merge requests found
...@@ -715,6 +715,12 @@ int wcd_cpe_ssr_event(void *core_handle, ...@@ -715,6 +715,12 @@ int wcd_cpe_ssr_event(void *core_handle,
{ {
struct wcd_cpe_core *core = core_handle; struct wcd_cpe_core *core = core_handle;
if (!core) {
pr_err("%s: Invalid handle to core\n",
__func__);
return -EINVAL;
}
dev_dbg(core->dev, dev_dbg(core->dev,
"%s: Schedule ssr work, event = %d\n", "%s: Schedule ssr work, event = %d\n",
__func__, core->ssr_type); __func__, core->ssr_type);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment