summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/pm.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-06-03 22:34:48 +0300
committerRobert Jarzmik <robert.jarzmik@free.fr>2017-06-14 09:32:21 +0300
commitc276557de3087ef67ad1aec4222f9f8b1d005f80 (patch)
treec924e215229b99bbb29e14f58b3bf75dfe2c1a2f /arch/arm/mach-pxa/pm.c
parent7ade445c26269d5af6c34ee50be97d54a3992d02 (diff)
downloadlinux-c276557de3087ef67ad1aec4222f9f8b1d005f80.tar.xz
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>
Diffstat (limited to 'arch/arm/mach-pxa/pm.c')
-rw-r--r--arch/arm/mach-pxa/pm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index e7450fb49d24..f2237f471750 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -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;