diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2017-05-22 08:24:24 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2017-06-22 18:14:12 -0400 |
commit | dcfca27faf6d19d2af530cfccee2fcdbcd836a2c (patch) | |
tree | 4eaba0f6eba2f40bc835342425a9cbd7d8d314f5 /net/nfc | |
parent | ae72c9910b170e55386586cf18ef9015a8d172e6 (diff) |
NFC: digital: Delete an error message for memory allocation failure
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>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'net/nfc')
-rw-r--r-- | net/nfc/digital_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/nfc/digital_core.c b/net/nfc/digital_core.c index 321514636da1..de6dd37d04c7 100644 --- a/net/nfc/digital_core.c +++ b/net/nfc/digital_core.c | |||
@@ -707,10 +707,8 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target, | |||
707 | int rc; | 707 | int rc; |
708 | 708 | ||
709 | data_exch = kzalloc(sizeof(*data_exch), GFP_KERNEL); | 709 | data_exch = kzalloc(sizeof(*data_exch), GFP_KERNEL); |
710 | if (!data_exch) { | 710 | if (!data_exch) |
711 | pr_err("Failed to allocate data_exch struct\n"); | ||
712 | return -ENOMEM; | 711 | return -ENOMEM; |
713 | } | ||
714 | 712 | ||
715 | data_exch->cb = cb; | 713 | data_exch->cb = cb; |
716 | data_exch->cb_context = cb_context; | 714 | data_exch->cb_context = cb_context; |