mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
Bluetooth: Simplify __l2cap_global_chan_by_addr
Make __l2cap_global_chan_by_addr similar to other find functions. Signed-off-by: Szymon Janc <[email protected]> Signed-off-by: Gustavo F. Padovan <[email protected]>
This commit is contained in:
parent
d1726b6dc9
commit
250938cb37
1 changed files with 2 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue