dsp: afe: get apr handle before sending apr pkt

Make sure to get apr handle before sending a packet
so that it does not end up with no handle to send
the apr packet.

Change-Id: Iaaebee3ddc6c83896e4cb9dc8149d310fc7d67f1
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
This commit is contained in:
Karthikeyan Mani
2019-03-21 18:00:51 -07:00
parent 527070fcf2
commit 5670cbd6e3
2 changed files with 14 additions and 1 deletions

View File

@@ -364,7 +364,8 @@ int apr_send_pkt(void *handle, uint32_t *buf)
unsigned long flags;
if (!handle || !buf) {
pr_err("APR: Wrong parameters\n");
pr_err("APR: Wrong parameters for %s\n",
!handle ? "handle" : "buf");
return -EINVAL;
}
if (svc->need_reset) {