Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 88596d4c authored by Sathish Ambley's avatar Sathish Ambley
Browse files

msm: ADSPRPC: Release session only when channel is open



An attempt to release the session is necessary only when the
channel has been opened with the remote processor.

Change-Id: I582b2ada907468327b55ed7603389bdb7649337d
Signed-off-by: default avatarSathish Ambley <sathishambley@codeaurora.org>
parent 505cb22c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1189,6 +1189,9 @@ static int fastrpc_release_current_dsp_process(struct fastrpc_file *fl)
	remote_arg_t ra[1];
	int tgid = 0;

	VERIFY(err, fl->apps->channel[fl->cid].chan != 0);
	if (err)
		goto bail;
	tgid = fl->tgid;
	ra[0].buf.pv = &tgid;
	ra[0].buf.len = sizeof(tgid);
@@ -1198,6 +1201,7 @@ static int fastrpc_release_current_dsp_process(struct fastrpc_file *fl)
	ioctl.fds = 0;
	VERIFY(err, 0 == (err = fastrpc_internal_invoke(fl,
		FASTRPC_MODE_PARALLEL, 1, &ioctl)));
bail:
	return err;
}