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

Commit bf683612 authored by Gjorgji Rosikopulos's avatar Gjorgji Rosikopulos
Browse files

msm: camera: gen buf mng: Fix compat error handling



In compat implementation returned if internal
handler fails. This causes multiple issues
in userspace where call succeed but buffer
index is not vaild.

Change-Id: I970134ff65c5b0f0aa6b00b62439ceb20462aa5f
Signed-off-by: default avatarGjorgji Rosikopulos <grosik@codeaurora.org>
parent 408d933c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file,
		break;
	default:
		pr_debug("%s : unsupported compat type", __func__);
		break;
		return -ENOIOCTLCMD;
	}

	switch (cmd) {
@@ -231,9 +231,14 @@ static long msm_bmgr_subdev_fops_compat_ioctl(struct file *file,
	case VIDIOC_MSM_BUF_MNGR_BUF_DONE:
	case VIDIOC_MSM_BUF_MNGR_PUT_BUF:
		rc = v4l2_subdev_call(sd, core, ioctl, cmd, &buf_info);
		if (rc < 0) {
			pr_debug("%s : Subdev cmd %d fail", __func__, cmd);
			return rc;
		}
		break;
	default:
		pr_debug("%s : unsupported compat type", __func__);
		return -ENOIOCTLCMD;
		break;
	}