diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2016-10-12 05:22:47 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-16 12:42:41 -0200 |
commit | 11691f0e8aaef776320938c9018f5785d09f59c5 (patch) | |
tree | 9351522fb5da507e1723956e7fbd09c239121a67 /drivers/media/platform/davinci/vpfe_capture.c | |
parent | ed011a23c90796c386ae7004ef0823ade6583d21 (diff) | |
download | linux-stable-11691f0e8aaef776320938c9018f5785d09f59c5.tar.gz linux-stable-11691f0e8aaef776320938c9018f5785d09f59c5.tar.bz2 linux-stable-11691f0e8aaef776320938c9018f5785d09f59c5.zip |
[media] DaVinci-VPFE-Capture: Delete three error messages for a failed memory allocation
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such a logging statement in two functions.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/davinci/vpfe_capture.c')
-rw-r--r-- | drivers/media/platform/davinci/vpfe_capture.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index a9bc35e785a3..22f48342584b 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c @@ -512,11 +512,9 @@ static int vpfe_open(struct file *file) /* Allocate memory for the file handle object */ fh = kmalloc(sizeof(struct vpfe_fh), GFP_KERNEL); - if (NULL == fh) { - v4l2_err(&vpfe_dev->v4l2_dev, - "unable to allocate memory for file handle object\n"); + if (!fh) return -ENOMEM; - } + /* store pointer to fh in private_data member of file */ file->private_data = fh; fh->vpfe_dev = vpfe_dev; @@ -1851,11 +1849,8 @@ static int vpfe_probe(struct platform_device *pdev) /* Allocate memory for ccdc configuration */ ccdc_cfg = kmalloc(sizeof(struct ccdc_config), GFP_KERNEL); - if (NULL == ccdc_cfg) { - v4l2_err(pdev->dev.driver, - "Memory allocation failed for ccdc_cfg\n"); + if (!ccdc_cfg) goto probe_free_dev_mem; - } mutex_lock(&ccdc_lock); @@ -1942,8 +1937,6 @@ static int vpfe_probe(struct platform_device *pdev) sizeof(*vpfe_dev->sd), GFP_KERNEL); if (NULL == vpfe_dev->sd) { - v4l2_err(&vpfe_dev->v4l2_dev, - "unable to allocate memory for subdevice pointers\n"); ret = -ENOMEM; goto probe_out_video_unregister; } |