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

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
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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) {