From eceb28c46f196ed8a6ec2310707b5b9820d47ded Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Wed, 11 Jan 2012 10:59:45 +0100 Subject: [PATCH] --- yaml --- r: 290872 b: refs/heads/master c: 75b93b59ad625d734b1c7d7e05bf6b9898c8c28f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/net/bluetooth/l2cap.h | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 186847c9de53..c0d5096f7775 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8b281b9c7820b054d15cf471c418fd884cbbec78 +refs/heads/master: 75b93b59ad625d734b1c7d7e05bf6b9898c8c28f diff --git a/trunk/include/net/bluetooth/l2cap.h b/trunk/include/net/bluetooth/l2cap.h index 26486e182f55..238daf84184c 100644 --- a/trunk/include/net/bluetooth/l2cap.h +++ b/trunk/include/net/bluetooth/l2cap.h @@ -616,11 +616,16 @@ static inline void l2cap_set_timer(struct l2cap_chan *chan, schedule_delayed_work(work, timeout); } -static inline void l2cap_clear_timer(struct l2cap_chan *chan, +static inline bool l2cap_clear_timer(struct l2cap_chan *chan, struct delayed_work *work) { - if (__cancel_delayed_work(work)) + bool ret; + + ret = __cancel_delayed_work(work); + if (ret) l2cap_chan_put(chan); + + return ret; } #define __set_chan_timer(c, t) l2cap_set_timer(c, &c->chan_timer, (t))