Commit 322b1694 authored by Hariprasad Kelam's avatar Hariprasad Kelam Committed by Mauro Carvalho Chehab

media: staging/media/davinci_vpfe: Add null check post kmalloc

Add NULL check post memory operations
Signed-off-by: default avatarHariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 094efbe7
......@@ -1311,6 +1311,11 @@ static int ipipe_g_config(struct v4l2_subdev *sd, struct vpfe_ipipe_config *cfg)
to = *(void **)((void *)cfg + module_if->config_offset);
params = kmalloc(sizeof(*params), GFP_KERNEL);
if (!params) {
rval = -ENOMEM;
goto error;
}
from = (void *)params + module_if->param_offset;
size = module_if->param_size;
......
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