summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2014-02-26 10:26:45 +0800
committerSamuel Ortiz <sameo@linux.intel.com>2014-03-14 20:19:08 +0100
commit29e27dd86b5c4f8e6feb62d7b6a8491539ff1ef1 (patch)
tree14655abbfc44f2b59270bbd41a3e72239f9e269f
parent3143a4ca610d6a3de0d8814ee6f5f7da6fc7fbfa (diff)
downloadtalos-obmc-linux-29e27dd86b5c4f8e6feb62d7b6a8491539ff1ef1.tar.gz
talos-obmc-linux-29e27dd86b5c4f8e6feb62d7b6a8491539ff1ef1.zip
NFC: llcp: Use list_for_each_entry in nfc_llcp_find_local()
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>
-rw-r--r--net/nfc/llcp_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/nfc/llcp_core.c b/net/nfc/llcp_core.c
index 0cf9d4f45e6a..b486f12ae243 100644
--- a/net/nfc/llcp_core.c
+++ b/net/nfc/llcp_core.c
@@ -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;
OpenPOWER on IntegriCloud