From: SF Markus Elfring <elfring@users.sourceforge.net>
To: adi-buildroot-devel@lists.sourceforge.net,
Ingo Molnar <mingo@kernel.org>, Steven Miao <realmz6@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_enter()
Date: Wed, 24 May 2017 20:03:45 +0200 [thread overview]
Message-ID: <ba3c2de3-a43d-0725-90c2-9c3b465eeb84@users.sourceforge.net> (raw)
In-Reply-To: <a8f92213-f0c5-8a4f-2b9e-60645f426210@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 24 May 2017 19:29:25 +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>
---
arch/blackfin/mach-common/pm.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c
index 5ece38a5b758..f4d442b7a1a1 100644
--- a/arch/blackfin/mach-common/pm.c
+++ b/arch/blackfin/mach-common/pm.c
@@ -151,10 +151,8 @@ int bfin_pm_suspend_mem_enter(void)
+ L1_DATA_B_LENGTH + L1_SCRATCH_LENGTH,
GFP_ATOMIC);
- if (memptr == NULL) {
- panic("bf53x_suspend_l1_mem malloc failed");
+ if (!memptr)
return -ENOMEM;
- }
#ifndef CONFIG_BF60x
wakeup = bfin_read_VR_CTL() & ~FREQ;
--
2.13.0
next prev parent reply other threads:[~2017-05-24 18:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 18:02 [PATCH 0/2] Blackfin: Adjustments for two function implementations SF Markus Elfring
2017-05-24 18:03 ` SF Markus Elfring [this message]
2017-05-27 18:43 ` [PATCH 1/2] blackfin: Delete an error message for a failed memory allocation in bfin_pm_suspend_mem_enter() Al Viro
2017-05-24 18:04 ` [PATCH 2/2] blackfin: Delete an error message for a failed memory allocation in isram_test_init() SF Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ba3c2de3-a43d-0725-90c2-9c3b465eeb84@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=realmz6@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).