From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Samuel Ortiz <sameo@linux.intel.com>,
Thierry Escande <thierry.escande@collabora.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 2/2] NFC: digital: Delete an error message for a failed memory allocation in digital_in_send()
Date: Mon, 22 May 2017 15:00:17 +0200 [thread overview]
Message-ID: <94b99b09-8f6f-3532-0738-b2edba96dd26@users.sourceforge.net> (raw)
In-Reply-To: <7e27a76c-de7a-22ec-cf8a-31aee2000e29@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 May 2017 14:24:24 +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>
---
net/nfc/digital_core.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c
index 3baf91f3ef80..8e02a3e1b319 100644
--- a/net/nfc/digital_core.c
+++ b/net/nfc/digital_core.c
@@ -710,7 +710,5 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target,
- if (!data_exch) {
- pr_err("Failed to allocate data_exch struct\n");
+ if (!data_exch)
return -ENOMEM;
- }
data_exch->cb = cb;
data_exch->cb_context = cb_context;
--
2.13.0
next prev parent reply other threads:[~2017-05-22 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-22 12:57 [PATCH 0/2] NFC-digital: Adjustments for four function implementations SF Markus Elfring
2017-05-22 12:58 ` [PATCH 1/2] NFC: digital: Improve a size determination in four functions SF Markus Elfring
2017-05-22 13:00 ` SF Markus Elfring [this message]
2017-06-22 22:17 ` [PATCH 0/2] NFC-digital: Adjustments for four function implementations Samuel Ortiz
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=94b99b09-8f6f-3532-0738-b2edba96dd26@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=thierry.escande@collabora.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).