mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 05:44:11 +00:00
media: staging: atomisp: Check return value from compat_alloc_user_space
If something gets wrong, return, instead of trying to convert from a NULL pointer. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
84f1b2dc0c
commit
a5047a3400
1 changed files with 2 additions and 0 deletions
|
@ -863,6 +863,8 @@ static long atomisp_do_compat_ioctl(struct file *file,
|
|||
sizeof(struct atomisp_morph_table) +
|
||||
sizeof(struct atomisp_dis_coefficients) +
|
||||
sizeof(struct atomisp_dvs_6axis_config) : 0));
|
||||
if (!karg)
|
||||
return -ENOMEM;
|
||||
|
||||
/* First, convert the command. */
|
||||
switch (cmd) {
|
||||
|
|
Loading…
Reference in a new issue