mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 23:50:53 +07: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
@ -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 New Issue
Block a user