drivers/sh/intc/virq.c: delete an error message for a failed memory allocation in...
authorSF Markus Elfring <elfring@users.sourceforge.net>
Thu, 6 Jul 2017 22:36:04 +0000 (15:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Jul 2017 23:24:30 +0000 (16:24 -0700)
This issue was detected by using the Coccinelle software.

Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Link: http://lkml.kernel.org/r/54e30d61-5183-9911-cf35-1410fb78da5a@users.sourceforge.net
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/sh/intc/virq.c

index 35bbe288ddb4ebe11eccebce4ca776b1e47a1340..a638c3048207c0cad5fb89a6824950340e7d0754 100644 (file)
@@ -94,10 +94,8 @@ static int add_virq_to_pirq(unsigned int irq, unsigned int virq)
        }
 
        entry = kzalloc(sizeof(struct intc_virq_list), GFP_ATOMIC);
-       if (!entry) {
-               pr_err("can't allocate VIRQ mapping for %d\n", virq);
+       if (!entry)
                return -ENOMEM;
-       }
 
        entry->irq = virq;