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

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

Merge "diag: Donot queue read in error case during mhi diag open"

parents fc63daf2 ac0355c6
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -320,6 +320,8 @@ static int __mhi_open(struct diag_mhi_info *mhi_info, int open_flag)

static int mhi_open(int id)
{
	int err = 0;

	if (id < 0 || id >= NUM_MHI_DEV) {
		pr_err("diag: In %s, invalid index %d\n", __func__, id);
		return -EINVAL;
@@ -330,7 +332,9 @@ static int mhi_open(int id)
	 * explicitly by Diag. Open both the read and write channels (denoted by
	 * OPEN_CHANNELS flag)
	 */
	__mhi_open(&diag_mhi[id], OPEN_CHANNELS);
	err = __mhi_open(&diag_mhi[id], OPEN_CHANNELS);
	if (err)
		return err;
	diag_remote_dev_open(diag_mhi[id].dev_id);
	queue_work(diag_mhi[id].mhi_wq, &(diag_mhi[id].read_work));