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

Commit be826139 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ADSPRPC: Log release error only when init is successful"

parents 287f276c eb5017ba
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ struct fastrpc_file {
	int pd;
	char *spdname;
	int file_close;
	int dsp_process_init;
	struct fastrpc_apps *apps;
	struct hlist_head perf;
	struct dentry *debugfs_file;
@@ -2183,7 +2184,9 @@ static int fastrpc_init_process(struct fastrpc_file *fl,
			goto bail;
	} else {
		err = -ENOTTY;
		goto bail;
	}
	fl->dsp_process_init = 1;
bail:
	kfree(proc_name);
	if (err && (init->flags == FASTRPC_INIT_CREATE_STATIC))
@@ -2221,6 +2224,9 @@ static int fastrpc_release_current_dsp_process(struct fastrpc_file *fl)
	if (err)
		goto bail;
	VERIFY(err, fl->apps->channel[fl->cid].rpdev != NULL);
	if (err)
		goto bail;
	VERIFY(err, fl->apps->channel[fl->cid].issubsystemup == 1);
	if (err)
		goto bail;
	tgid = fl->tgid;
@@ -2234,7 +2240,7 @@ static int fastrpc_release_current_dsp_process(struct fastrpc_file *fl)
	ioctl.crc = NULL;
	VERIFY(err, 0 == (err = fastrpc_internal_invoke(fl,
		FASTRPC_MODE_PARALLEL, 1, &ioctl)));
	if (err)
	if (err && fl->dsp_process_init)
		pr_err("adsprpc: %s: releasing DSP process failed for %s, returned 0x%x",
					__func__, current->comm, err);
bail:
@@ -3239,6 +3245,7 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp)
		fl->debugfs_file = debugfs_file;
	memset(&fl->perf, 0, sizeof(fl->perf));
	fl->qos_request = 0;
	fl->dsp_process_init = 0;
	filp->private_data = fl;
	mutex_init(&fl->internal_map_mutex);
	mutex_init(&fl->map_mutex);