Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dcfca27f authored by Markus Elfring's avatar Markus Elfring Committed by Samuel Ortiz
Browse files

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent ae72c991
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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;