ARM: pxa: Delete an error message for a failed memory allocation in pxa_pm_init()

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>
This commit is contained in:
Markus Elfring 2017-06-03 21:34:48 +02:00 committed by Robert Jarzmik
parent 7ade445c26
commit c276557de3

View 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;