mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
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>
This commit is contained in:
parent
99968e0616
commit
156cef80f2
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user