Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1646872
| From | SF Markus Elfring <elfring@users.sourceforge.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/2] NFC: digital: Delete an error message for a failed memory allocation in digital_in_send() |
| Date | 2017-05-22 15:10 +0200 |
| Message-ID | <tJVfY-68S-41@gated-at.bofh.it> (permalink) |
| References | <tJV6i-5Qr-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 0/2] NFC-digital: Adjustments for four function implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 15:00 +0200 [PATCH 1/2] NFC: digital: Improve a size determination in four functions SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 15:00 +0200 [PATCH 2/2] NFC: digital: Delete an error message for a failed memory allocation in digital_in_send() SF Markus Elfring <elfring@users.sourceforge.net> - 2017-05-22 15:10 +0200
csiph-web