summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/davinci
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-10-11 04:56:13 -0300
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 12:19:50 -0200
commit2ac0989242fbf2f2da7109eab08f68382884a81a (patch)
tree909ccc2ff092a7f624ea314ffd367d7dbde3cfac /drivers/media/platform/davinci
parentf42afd29e60585904fc5127862263437ed7cbbd5 (diff)
downloadlinux-2ac0989242fbf2f2da7109eab08f68382884a81a.tar.bz2
[media] DaVinci-VPBE: Delete two 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')
-rw-r--r--drivers/media/platform/davinci/vpbe.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
index 785d6cf93152..79c2ebe3862a 100644
--- a/drivers/media/platform/davinci/vpbe.c
+++ b/drivers/media/platform/davinci/vpbe.c
@@ -680,8 +680,6 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
sizeof(*vpbe_dev->encoders),
GFP_KERNEL);
if (NULL == vpbe_dev->encoders) {
- v4l2_err(&vpbe_dev->v4l2_dev,
- "unable to allocate memory for encoders sub devices");
ret = -ENOMEM;
goto fail_dev_unregister;
}
@@ -837,10 +835,9 @@ static int vpbe_probe(struct platform_device *pdev)
}
vpbe_dev = kzalloc(sizeof(*vpbe_dev), GFP_KERNEL);
- if (vpbe_dev == NULL) {
- v4l2_err(pdev->dev.driver, "Unable to allocate memory for vpbe_device\n");
+ if (!vpbe_dev)
return -ENOMEM;
- }
+
vpbe_dev->cfg = cfg;
vpbe_dev->ops = vpbe_dev_ops;
vpbe_dev->pdev = &pdev->dev;