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

Commit 21de0dc5 authored by Yiduo Wang's avatar Yiduo Wang
Browse files

msm: isp: Release hw if reset hw times out after init_hw



After init_hw, if reset_hw fails, release_hw needs to be
called as part of error handling to close subdev

Change-Id: Ifde5dcdc8e7617165217200bb2dd4f46d718c309
Signed-off-by: default avatarAzam Sadiq Pasha Kapatrala Syed <akapatra@codeaurora.org>
Signed-off-by: default avatarYiduo Wang <yiduow@codeaurora.org>
parent ecf49392
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1421,6 +1421,7 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
	rc = vfe_dev->hw_info->vfe_ops.core_ops.reset_hw(vfe_dev);
	if (rc <= 0) {
		pr_err("%s: reset timeout\n", __func__);
		vfe_dev->hw_info->vfe_ops.core_ops.release_hw(vfe_dev);
		vfe_dev->vfe_open_cnt--;
		mutex_unlock(&vfe_dev->core_mutex);
		mutex_unlock(&vfe_dev->realtime_mutex);