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

Commit b6d46f94 authored by Hariram Purushothaman's avatar Hariram Purushothaman
Browse files

msm: camera: pm_relax only if the session create fails



Release the pm wakeup resource only when create session fails.

Change-Id: Ib0665f891309e4c86168885c40c4caaa13d63226
Signed-off-by: default avatarHariram Purushothaman <hariramp@codeaurora.org>
parent 8b477bbf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -614,7 +614,7 @@ static int camera_v4l2_open(struct file *filep)
		if (rc < 0) {
			pr_err("%s : creation of command_ack queue failed Line %d rc %d\n",
					__func__, __LINE__, rc);
			goto session_fail;
			goto stream_fail;
		}
	}
	idx |= (1 << find_first_zero_bit((const unsigned long *)&opn_idx,
@@ -628,6 +628,7 @@ command_ack_q_fail:
	msm_destroy_session(pvdev->vdev->num);
session_fail:
	pm_relax(&pvdev->vdev->dev);
stream_fail:
	camera_v4l2_vb2_q_release(filep);
vb2_q_fail:
	camera_v4l2_fh_release(filep);