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;
|
break;
|
||||||
default: {
|
default: {
|
||||||
if (ioctl_ptr == NULL) {
|
if (ioctl_ptr == NULL) {
|
||||||
pr_err("Wrong ioctl_ptr %pK for cmd %u\n",
|
pr_err("Wrong ioctl_ptr for cmd %u\n", cmd);
|
||||||
ioctl_ptr, cmd);
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
*ioctl_ptr = arg;
|
*ioctl_ptr = arg;
|
||||||
if ((*ioctl_ptr == NULL) ||
|
if ((*ioctl_ptr == NULL) ||
|
||||||
((*ioctl_ptr)->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;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue