aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/bluetooth/l2cap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index d80e3f0691b..e5164ff55f2 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -672,11 +672,15 @@ enum {
672 672
673static inline void l2cap_chan_hold(struct l2cap_chan *c) 673static inline void l2cap_chan_hold(struct l2cap_chan *c)
674{ 674{
675 BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
676
675 atomic_inc(&c->refcnt); 677 atomic_inc(&c->refcnt);
676} 678}
677 679
678static inline void l2cap_chan_put(struct l2cap_chan *c) 680static inline void l2cap_chan_put(struct l2cap_chan *c)
679{ 681{
682 BT_DBG("chan %p orig refcnt %d", c, atomic_read(&c->refcnt));
683
680 if (atomic_dec_and_test(&c->refcnt)) 684 if (atomic_dec_and_test(&c->refcnt))
681 kfree(c); 685 kfree(c);
682} 686}