1
0
Fork 0

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>
zero-colors
Markus Elfring 2017-05-22 14:24:24 +02:00 committed by Samuel Ortiz
parent ae72c9910b
commit dcfca27faf
1 changed files with 1 additions and 3 deletions

View File

@ -707,10 +707,8 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target,
int rc;
data_exch = kzalloc(sizeof(*data_exch), GFP_KERNEL);
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;