diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2020-06-04 19:16:21 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-06-11 19:47:47 +0300 |
commit | a5047a3400d51c043a6501f960eefc8b102c9203 (patch) | |
tree | 62e734abf359ffc4a2afe94f9329463d5524c18c /drivers/staging/media/atomisp | |
parent | 84f1b2dc0c47b11aff3de1af237e8377e8bb7898 (diff) | |
download | linux-a5047a3400d51c043a6501f960eefc8b102c9203.tar.xz |
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>
Diffstat (limited to 'drivers/staging/media/atomisp')
-rw-r--r-- | drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c b/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c index c8649923b6b9..e06cf1883fc4 100644 --- a/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c +++ b/drivers/staging/media/atomisp/pci/atomisp_compat_ioctl32.c @@ -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) { |