summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2011-11-16 09:32:22 +0100
committerGustavo F. Padovan <padovan@profusion.mobi>2011-11-16 18:29:44 -0200
commit250938cb370351fb603e1d47292377421bb029b2 (patch)
tree2ae6d62af54d5b642dc5db6098571c45a8df3bb0 /net/bluetooth
parentd1726b6dc95b5ed0914e969f6765a9e2cf7baf04 (diff)
Bluetooth: Simplify __l2cap_global_chan_by_addr
Make __l2cap_global_chan_by_addr similar to other find functions. Signed-off-by: Szymon Janc <szymon.janc@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap_core.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 26925a8f8ea..7c746ec8514 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -154,12 +154,9 @@ static struct l2cap_chan *__l2cap_global_chan_by_addr(__le16 psm, bdaddr_t *src)
list_for_each_entry(c, &chan_list, global_l) {
if (c->sport == psm && !bacmp(&bt_sk(c->sk)->src, src))
- goto found;
+ return c;
}
-
- c = NULL;
-found:
- return c;
+ return NULL;
}
int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm)