linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe()
Date: Fri, 12 May 2017 20:51:26 +0200	[thread overview]
Message-ID: <df23f2fa-ad4a-8338-8641-96782e50f6a7@users.sourceforge.net> (raw)
In-Reply-To: <5d5cd752-f2f2-b511-6b1e-daf5bf1bc522@users.sourceforge.net>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Fri, 12 May 2017 20:23:43 +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>
---
 drivers/hwtracing/coresight/coresight-etb10.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-etb10.c b/drivers/hwtracing/coresight/coresight-etb10.c
index 979ea6ec7902..837aebf22c45 100644
--- a/drivers/hwtracing/coresight/coresight-etb10.c
+++ b/drivers/hwtracing/coresight/coresight-etb10.c
@@ -675,11 +675,8 @@ static int etb_probe(struct amba_device *adev, const struct amba_id *id)
 
 	drvdata->buf = devm_kzalloc(dev,
 				    drvdata->buffer_depth * 4, GFP_KERNEL);
-	if (!drvdata->buf) {
-		dev_err(dev, "Failed to allocate %u bytes for buffer data\n",
-			drvdata->buffer_depth * 4);
+	if (!drvdata->buf)
 		return -ENOMEM;
-	}
 
 	desc.type = CORESIGHT_DEV_TYPE_SINK;
 	desc.subtype.sink_subtype = CORESIGHT_DEV_SUBTYPE_SINK_BUFFER;
-- 
2.12.3

  reply	other threads:[~2017-05-12 18:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 18:50 [PATCH 0/3] CoreSight-ETB10: Adjustments for three function implementations SF Markus Elfring
2017-05-12 18:51 ` SF Markus Elfring [this message]
2017-05-15 17:44   ` [PATCH 1/3] coresight: etb10: Delete an error message for a failed memory allocation in etb_probe() Mathieu Poirier
2017-05-12 18:52 ` [PATCH 2/3] coresight: etb10: Fix a typo in a comment line SF Markus Elfring
2017-05-15 17:44   ` Mathieu Poirier
2017-05-12 18:53 ` [PATCH 3/3] coresight: etb10: Improve a size determination in etb_alloc_buffer() SF Markus Elfring
2017-05-15 17:47   ` Mathieu Poirier
2017-05-15 19:34     ` 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=df23f2fa-ad4a-8338-8641-96782e50f6a7@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;
as well as URLs for NNTP newsgroup(s).