diff options
author | Axel Lin <axel.lin@ingics.com> | 2014-02-14 06:29:19 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-02-23 17:32:18 -0500 |
commit | 156cef80f2a1aea4f150dff5d990e8fbbd96d862 (patch) | |
tree | ae2e7be9df7ab69563ffe8035306591dca4e6f56 /net | |
parent | 99968e0616b802173ef83a94d3bdefa12c33eba8 (diff) |
NFC: Use list_for_each_entry in nfc_find_se()
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/nfc/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/core.c b/net/nfc/core.c index ca1e65f4b133..ada92316f723 100644 --- a/net/nfc/core.c +++ b/net/nfc/core.c | |||
@@ -546,9 +546,9 @@ error: | |||
546 | 546 | ||
547 | struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx) | 547 | struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx) |
548 | { | 548 | { |
549 | struct nfc_se *se, *n; | 549 | struct nfc_se *se; |
550 | 550 | ||
551 | list_for_each_entry_safe(se, n, &dev->secure_elements, list) | 551 | list_for_each_entry(se, &dev->secure_elements, list) |
552 | if (se->idx == se_idx) | 552 | if (se->idx == se_idx) |
553 | return se; | 553 | return se; |
554 | 554 | ||