forked from Minki/linux
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: Axel Lin <axel.lin@ingics.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
3143a4ca61
commit
29e27dd86b
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user