Merge "msm: camera: Add error check for cmd in IOCTL."
This commit is contained in:
commit
7918375ff3
1 changed files with 4 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -486,6 +486,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