Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361465
b: refs/heads/master
c: 3536da0
h: refs/heads/master
i:
  361463: 22d98e7
v: v3
  • Loading branch information
Samuel Ortiz committed Mar 8, 2013
1 parent af0dbe0 commit 337977b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b141e811a0763bb107af4cd99d456193ccdb8053
refs/heads/master: 3536da06db0baa675f32de608c0a4c0f5ef0e9ff
21 changes: 14 additions & 7 deletions trunk/net/nfc/llcp/llcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,20 +142,25 @@ struct nfc_llcp_local *nfc_llcp_local_get(struct nfc_llcp_local *local)
return local;
}

static void local_release(struct kref *ref)
static void local_cleanup(struct nfc_llcp_local *local, bool listen)
{
struct nfc_llcp_local *local;

local = container_of(ref, struct nfc_llcp_local, ref);

list_del(&local->list);
nfc_llcp_socket_release(local, false);
nfc_llcp_socket_release(local, listen);
del_timer_sync(&local->link_timer);
skb_queue_purge(&local->tx_queue);
cancel_work_sync(&local->tx_work);
cancel_work_sync(&local->rx_work);
cancel_work_sync(&local->timeout_work);
kfree_skb(local->rx_pending);
}

static void local_release(struct kref *ref)
{
struct nfc_llcp_local *local;

local = container_of(ref, struct nfc_llcp_local, ref);

list_del(&local->list);
local_cleanup(local, false);
kfree(local);
}

Expand Down Expand Up @@ -1427,6 +1432,8 @@ void nfc_llcp_unregister_device(struct nfc_dev *dev)
return;
}

local_cleanup(local, false);

nfc_llcp_local_put(local);
}

Expand Down

0 comments on commit 337977b

Please sign in to comment.