msm: camera: Add error check for cmd in IOCTL.
Return EINVAL if cmd is not v4l2 PRIVATE_IOCTL_CMD. CRs-Fixed: 2016416 Change-Id: I6758bc9d6b159b2e2e4eba5a9d9a3882de320041 Signed-off-by: Terence Ho <terenceh@codeaurora.org>
This commit is contained in:
parent
0045ec6f11
commit
206a79a7fa
1 changed files with 3 additions and 0 deletions
|
@ -491,6 +491,9 @@ static long camera_v4l2_vidioc_private_ioctl(struct file *filep, void *fh,
|
|||
if (WARN_ON(!k_ioctl || !pvdev))
|
||||
return -EIO;
|
||||
|
||||
if (cmd != VIDIOC_MSM_CAMERA_PRIVATE_IOCTL_CMD)
|
||||
return -EINVAL;
|
||||
|
||||
switch (k_ioctl->id) {
|
||||
case MSM_CAMERA_PRIV_IOCTL_ID_RETURN_BUF: {
|
||||
struct msm_camera_return_buf ptr, *tmp = NULL;
|
||||
|
|
Loading…
Add table
Reference in a new issue