From: Markus Elfring Date: Fri, 4 Aug 2017 14:37:56 +0000 (+0200) Subject: powerpc/eeh: Delete an error out of memory message at init time X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6ab41161b44a3b4d504ac29c9dd9976890d76a3f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git powerpc/eeh: Delete an error out of memory message at init time 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 [mpe: Do not drop the message that can happen at runtime and lead to an event not being handled] Signed-off-by: Michael Ellerman --- diff --git a/arch/powerpc/kernel/eeh_dev.c b/arch/powerpc/kernel/eeh_dev.c index bdf4a3698a35..ad04ecd63c20 100644 --- a/arch/powerpc/kernel/eeh_dev.c +++ b/arch/powerpc/kernel/eeh_dev.c @@ -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;