summaryrefslogtreecommitdiff
path: root/drivers/media/pci/mantis
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-08-28 05:46:57 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-09-23 08:19:55 -0400
commitc38e8657a471e9af42b86009e5d3085031b41fda (patch)
treeb2bb818ff8b099ee5237da0ab3b9db680b520a0b /drivers/media/pci/mantis
parenta0ec8d1dc42e4255307cb1b95345c01c327a10a6 (diff)
media: drivers: delete error messages for failed memory allocation
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. [mchehab@s-opensource.com: fold several similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/mantis')
-rw-r--r--drivers/media/pci/mantis/hopper_cards.c1
-rw-r--r--drivers/media/pci/mantis/mantis_cards.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/pci/mantis/hopper_cards.c b/drivers/media/pci/mantis/hopper_cards.c
index 11e987860b23..0c91df34ec67 100644
--- a/drivers/media/pci/mantis/hopper_cards.c
+++ b/drivers/media/pci/mantis/hopper_cards.c
@@ -165,7 +165,6 @@ static int hopper_pci_probe(struct pci_dev *pdev,
mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
if (mantis == NULL) {
- printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
err = -ENOMEM;
goto fail0;
}
diff --git a/drivers/media/pci/mantis/mantis_cards.c b/drivers/media/pci/mantis/mantis_cards.c
index adc980d33711..2dba030c7132 100644
--- a/drivers/media/pci/mantis/mantis_cards.c
+++ b/drivers/media/pci/mantis/mantis_cards.c
@@ -174,10 +174,8 @@ static int mantis_pci_probe(struct pci_dev *pdev,
int err = 0;
mantis = kzalloc(sizeof(struct mantis_pci), GFP_KERNEL);
- if (mantis == NULL) {
- printk(KERN_ERR "%s ERROR: Out of memory\n", __func__);
+ if (!mantis)
return -ENOMEM;
- }
drvdata = (void *)pci_id->driver_data;
mantis->num = devs;