ARM: pxa: Delete an error message for a failed memory allocation in pxa_pm_init()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 3 Jun 2017 19:34:48 +0000 (21:34 +0200)
committerRobert Jarzmik <robert.jarzmik@free.fr>
Wed, 14 Jun 2017 06:32:21 +0000 (08:32 +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>
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
arch/arm/mach-pxa/pm.c

index e7450fb49d2493e373f30e8f0c844078383d1cc6..f2237f4717508aadd09800c8d06e203483e7fed8 100644 (file)
@@ -107,10 +107,8 @@ static int __init pxa_pm_init(void)
        sleep_save = kmalloc_array(pxa_cpu_pm_fns->save_count,
                                   sizeof(*sleep_save),
                                   GFP_KERNEL);
-       if (!sleep_save) {
-               printk(KERN_ERR "failed to alloc memory for pm save\n");
+       if (!sleep_save)
                return -ENOMEM;
-       }
 
        suspend_set_ops(&pxa_pm_ops);
        return 0;