Merge "msm: camera: cpp: Add validation for v4l2 ioctl arguments"
This commit is contained in:
commit
3a0a78d5f0
1 changed files with 2 additions and 3 deletions
|
@ -2913,15 +2913,14 @@ static int msm_cpp_validate_input(unsigned int cmd, void *arg,
|
|||
break;
|
||||
default: {
|
||||
if (ioctl_ptr == NULL) {
|
||||
pr_err("Wrong ioctl_ptr %pK for cmd %u\n",
|
||||
ioctl_ptr, cmd);
|
||||
pr_err("Wrong ioctl_ptr for cmd %u\n", cmd);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
*ioctl_ptr = arg;
|
||||
if ((*ioctl_ptr == NULL) ||
|
||||
((*ioctl_ptr)->ioctl_ptr == NULL)) {
|
||||
pr_err("Wrong arg %pK for cmd %u\n", arg, cmd);
|
||||
pr_err("Error invalid ioctl argument cmd %u", cmd);
|
||||
return -EINVAL;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue