]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
NFC: Use list_for_each_entry in nfc_find_se()
authorAxel Lin <axel.lin@ingics.com>
Fri, 14 Feb 2014 11:29:19 +0000 (19:29 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 23 Feb 2014 22:32:18 +0000 (23:32 +0100)
nfc_find_se() 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/core.c

index ca1e65f4b1331bfd164245996ed462ab61f46a4e..ada92316f723f882c44b5529d651dda08e9fab48 100644 (file)
@@ -546,9 +546,9 @@ error:
 
 struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx)
 {
-       struct nfc_se *se, *n;
+       struct nfc_se *se;
 
-       list_for_each_entry_safe(se, n, &dev->secure_elements, list)
+       list_for_each_entry(se, &dev->secure_elements, list)
                if (se->idx == se_idx)
                        return se;