Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1642746

[PATCH 2/2] sh/intc: Delete an error message for a failed memory allocation in add_virq_to_pirq()

From SF Markus Elfring <elfring@users.sourceforge.net>
Newsgroups linux.kernel
Subject [PATCH 2/2] sh/intc: Delete an error message for a failed memory allocation in add_virq_to_pirq()
Date 2017-05-16 21:00 +0200
Message-ID <tHPRo-M2-21@gated-at.bofh.it> (permalink)
References <tHPRn-M2-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 16 May 2017 20:23:43 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 drivers/sh/intc/virq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c
index 2079425c95ed..79d733f3411a 100644
--- a/drivers/sh/intc/virq.c
+++ b/drivers/sh/intc/virq.c
@@ -97,7 +97,5 @@ static int add_virq_to_pirq(unsigned int irq, unsigned int virq)
-	if (!entry) {
-		pr_err("can't allocate VIRQ mapping for %d\n", virq);
+	if (!entry)
 		return -ENOMEM;
-	}
 
 	entry->irq = virq;
 
-- 
2.13.0

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] sh/intc: Adjustments for add_virq_to_pirq() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-16 21:00 +0200
  [PATCH 2/2] sh/intc: Delete an error message for a failed memory  allocation in add_virq_to_pirq() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-16 21:00 +0200

csiph-web