Commit 29e27dd8 authored by Axel Lin's avatar Axel Lin Committed by Samuel Ortiz
Browse files

NFC: llcp: Use list_for_each_entry in nfc_llcp_find_local()



nfc_llcp_find_local() does not modify any list entry while iterating the list.
So use list_for_each_entry instead of list_for_each_entry_safe.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 3143a4ca
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -293,9 +293,9 @@ static void nfc_llcp_sdreq_timer(unsigned long data)

struct nfc_llcp_local *nfc_llcp_find_local(struct nfc_dev *dev)
{
	struct nfc_llcp_local *local, *n;
	struct nfc_llcp_local *local;

	list_for_each_entry_safe(local, n, &llcp_devices, list)
	list_for_each_entry(local, &llcp_devices, list)
		if (local->dev == dev)
			return local;