Netdev List
 help / color / mirror / Atom feed
* [PATCH] LiquidIO: Delete two error messages for a failed memory allocation in octeon_setup_interrupt()
@ 2018-01-01 17:18 SF Markus Elfring
  0 siblings, 0 replies; only message in thread
From: SF Markus Elfring @ 2018-01-01 17:18 UTC (permalink / raw)
  To: netdev, Derek Chickles, Felix Manlunas, Raghu Vatsavayi,
	Satanand Burla
  Cc: LKML, kernel-janitors

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 1 Jan 2018 18:14:49 +0100

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/net/ethernet/cavium/liquidio/lio_core.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/lio_core.c b/drivers/net/ethernet/cavium/liquidio/lio_core.c
index 32ae63b6f20e..012829de76b7 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_core.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_core.c
@@ -915,10 +915,8 @@ int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs)
 		/* allocate storage for the names assigned to each irq */
 		oct->irq_name_storage =
 			kcalloc(num_interrupts, INTRNAMSIZ, GFP_KERNEL);
-		if (!oct->irq_name_storage) {
-			dev_err(&oct->pci_dev->dev, "Irq name storage alloc failed...\n");
+		if (!oct->irq_name_storage)
 			return -ENOMEM;
-		}
 
 		queue_irq_names = oct->irq_name_storage;
 
@@ -930,7 +928,6 @@ int octeon_setup_interrupt(struct octeon_device *oct, u32 num_ioqs)
 					    sizeof(struct msix_entry),
 					    GFP_KERNEL);
 		if (!oct->msix_entries) {
-			dev_err(&oct->pci_dev->dev, "Memory Alloc failed...\n");
 			kfree(oct->irq_name_storage);
 			oct->irq_name_storage = NULL;
 			return -ENOMEM;
-- 
2.15.1

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-01 17:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-01 17:18 [PATCH] LiquidIO: Delete two error messages for a failed memory allocation in octeon_setup_interrupt() SF Markus Elfring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox