public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_init()
Date: Tue, 3 Oct 2017 11:23:23 +0200	[thread overview]
Message-ID: <672554ba-b476-8852-3c37-9e8716f1eec4@users.sourceforge.net> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 3 Oct 2017 11:16:56 +0200

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 arch/arm/mm/cache-l2x0-pmu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/arm/mm/cache-l2x0-pmu.c b/arch/arm/mm/cache-l2x0-pmu.c
index 0a1e2280141f..b3734da93010 100644
--- a/arch/arm/mm/cache-l2x0-pmu.c
+++ b/arch/arm/mm/cache-l2x0-pmu.c
@@ -528,10 +528,8 @@ static __init int l2x0_pmu_init(void)
 		return 0;
 
 	l2x0_pmu = kzalloc(sizeof(*l2x0_pmu), GFP_KERNEL);
-	if (!l2x0_pmu) {
-		pr_warn("Unable to allocate L2x0 PMU\n");
+	if (!l2x0_pmu)
 		return -ENOMEM;
-	}
 
 	*l2x0_pmu = (struct pmu) {
 		.task_ctx_nr = perf_invalid_context,
-- 
2.14.2

             reply	other threads:[~2017-10-03  9:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03  9:23 SF Markus Elfring [this message]
2017-10-03 10:07 ` [PATCH] ARM: cache-l2x0-pmu: Delete an error message for a failed memory allocation in l2x0_pmu_init() Mark Rutland

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=672554ba-b476-8852-3c37-9e8716f1eec4@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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