提交 dcfca27f 编写于 作者: M Markus Elfring 提交者: Samuel Ortiz

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.pdfSigned-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 ae72c991
...@@ -707,10 +707,8 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target, ...@@ -707,10 +707,8 @@ static int digital_in_send(struct nfc_dev *nfc_dev, struct nfc_target *target,
int rc; int rc;
data_exch = kzalloc(sizeof(*data_exch), GFP_KERNEL); data_exch = kzalloc(sizeof(*data_exch), GFP_KERNEL);
if (!data_exch) { if (!data_exch)
pr_err("Failed to allocate data_exch struct\n");
return -ENOMEM; return -ENOMEM;
}
data_exch->cb = cb; data_exch->cb = cb;
data_exch->cb_context = cb_context; data_exch->cb_context = cb_context;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册