diff options
author | Hariprasad Kelam <hariprasad.kelam@gmail.com> | 2019-06-29 22:31:27 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-07-23 18:44:26 +0300 |
commit | 322b169476aaeeb96515d69baaee330e47ac10a0 (patch) | |
tree | 31871152308af05784e49d2c74ea8dec950c7f64 /drivers/staging/media | |
parent | 094efbe748c204fb2e10ebf6f100da926e10fc2f (diff) | |
download | linux-322b169476aaeeb96515d69baaee330e47ac10a0.tar.xz |
media: staging/media/davinci_vpfe: Add null check post kmalloc
Add NULL check post memory operations
Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipe.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c index 52397ad0e3e2..5d8ba357906b 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.c @@ -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; |