Skip to content

Commit

Permalink
Bluetooth: Simplify __l2cap_global_chan_by_addr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Szymon Janc authored and Gustavo F. Padovan committed Nov 16, 2011
1 parent d1726b6 commit 250938c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 250938c

Please sign in to comment.