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

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
...@@ -293,9 +293,9 @@ static void nfc_llcp_sdreq_timer(unsigned long data) ...@@ -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 *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) if (local->dev == dev)
return local; return local;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment