提交 156cef80 编写于 作者: A Axel Lin 提交者: Samuel Ortiz

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: NAxel Lin <axel.lin@ingics.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 99968e06
...@@ -546,9 +546,9 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, ...@@ -546,9 +546,9 @@ int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb,
struct nfc_se *nfc_find_se(struct nfc_dev *dev, u32 se_idx) 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) if (se->idx == se_idx)
return se; return se;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册