Commit 11691f0e authored by Markus Elfring's avatar Markus Elfring Committed by Mauro Carvalho Chehab

[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.pdfSigned-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent ed011a23
...@@ -512,11 +512,9 @@ static int vpfe_open(struct file *file) ...@@ -512,11 +512,9 @@ static int vpfe_open(struct file *file)
/* Allocate memory for the file handle object */ /* Allocate memory for the file handle object */
fh = kmalloc(sizeof(struct vpfe_fh), GFP_KERNEL); fh = kmalloc(sizeof(struct vpfe_fh), GFP_KERNEL);
if (NULL == fh) { if (!fh)
v4l2_err(&vpfe_dev->v4l2_dev,
"unable to allocate memory for file handle object\n");
return -ENOMEM; return -ENOMEM;
}
/* store pointer to fh in private_data member of file */ /* store pointer to fh in private_data member of file */
file->private_data = fh; file->private_data = fh;
fh->vpfe_dev = vpfe_dev; fh->vpfe_dev = vpfe_dev;
...@@ -1851,11 +1849,8 @@ static int vpfe_probe(struct platform_device *pdev) ...@@ -1851,11 +1849,8 @@ static int vpfe_probe(struct platform_device *pdev)
/* Allocate memory for ccdc configuration */ /* Allocate memory for ccdc configuration */
ccdc_cfg = kmalloc(sizeof(struct ccdc_config), GFP_KERNEL); ccdc_cfg = kmalloc(sizeof(struct ccdc_config), GFP_KERNEL);
if (NULL == ccdc_cfg) { if (!ccdc_cfg)
v4l2_err(pdev->dev.driver,
"Memory allocation failed for ccdc_cfg\n");
goto probe_free_dev_mem; goto probe_free_dev_mem;
}
mutex_lock(&ccdc_lock); mutex_lock(&ccdc_lock);
...@@ -1942,8 +1937,6 @@ static int vpfe_probe(struct platform_device *pdev) ...@@ -1942,8 +1937,6 @@ static int vpfe_probe(struct platform_device *pdev)
sizeof(*vpfe_dev->sd), sizeof(*vpfe_dev->sd),
GFP_KERNEL); GFP_KERNEL);
if (NULL == vpfe_dev->sd) { if (NULL == vpfe_dev->sd) {
v4l2_err(&vpfe_dev->v4l2_dev,
"unable to allocate memory for subdevice pointers\n");
ret = -ENOMEM; ret = -ENOMEM;
goto probe_out_video_unregister; goto probe_out_video_unregister;
} }
......
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