powerpc/eeh: Delete an error out of memory message at init time
authorMarkus Elfring <elfring@users.sourceforge.net>
Fri, 4 Aug 2017 14:37:56 +0000 (16:37 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Sep 2017 06:42:53 +0000 (16:42 +1000)
Omit an extra message for a memory allocation failure in
eeh_dev_init().

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
[mpe: Do not drop the message that can happen at runtime and lead to
 an event not being handled]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/eeh_dev.c

index bdf4a3698a3576c94317bd2a4d76a0d6c4e74ec5..ad04ecd63c207def1a1dbb33172c4acc933a2a39 100644 (file)
@@ -54,11 +54,8 @@ struct eeh_dev *eeh_dev_init(struct pci_dn *pdn)
 
        /* Allocate EEH device */
        edev = kzalloc(sizeof(*edev), GFP_KERNEL);
-       if (!edev) {
-               pr_warn("%s: out of memory\n",
-                       __func__);
+       if (!edev)
                return NULL;
-       }
 
        /* Associate EEH device with OF node */
        pdn->edev = edev;