Commit a5047a34 authored by Sakari Ailus's avatar Sakari Ailus Committed by Mauro Carvalho Chehab

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: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 84f1b2dc
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment