mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 18:13:26 -04: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:
committed by
Mauro Carvalho Chehab
parent
84f1b2dc0c
commit
a5047a3400
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user