Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 413df10b authored by Axel Lin's avatar Axel Lin Committed by Samuel Ortiz
Browse files

NFC: llcp: Use list_for_each_entry in llcp_accept_poll



list_for_each_entry_safe() is necessary if list objects are deleted from
the list while traversing it. Not the case here, so we can use the base
list_for_each_entry variant.

Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent db083bcb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -524,12 +524,12 @@ static int llcp_sock_getname(struct socket *sock, struct sockaddr *uaddr,

static inline unsigned int llcp_accept_poll(struct sock *parent)
{
	struct nfc_llcp_sock *llcp_sock, *n, *parent_sock;
	struct nfc_llcp_sock *llcp_sock, *parent_sock;
	struct sock *sk;

	parent_sock = nfc_llcp_sock(parent);

	list_for_each_entry_safe(llcp_sock, n, &parent_sock->accept_queue,
	list_for_each_entry(llcp_sock, &parent_sock->accept_queue,
			    accept_queue) {
		sk = &llcp_sock->sk;