NFC: llcp: Use list_for_each_entry in nfc_llcp_find_local()
authorAxel Lin <axel.lin@ingics.com>
Wed, 26 Feb 2014 02:26:45 +0000 (10:26 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 14 Mar 2014 19:19:08 +0000 (20:19 +0100)
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>
net/nfc/llcp_core.c

index 0cf9d4f45e6a7cc46430615c89d572c3ced242d6..b486f12ae2433f175cdcf62af7284c812c9ea29e 100644 (file)
@@ -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;