Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 250938cb authored by Szymon Janc's avatar Szymon Janc Committed by Gustavo Padovan
Browse files

Bluetooth: Simplify __l2cap_global_chan_by_addr



Make __l2cap_global_chan_by_addr similar to other find functions.

Signed-off-by: default avatarSzymon Janc <szymon.janc@tieto.com>
Signed-off-by: default avatarGustavo F. Padovan <padovan@profusion.mobi>
parent d1726b6d
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -154,13 +154,10 @@ 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;
	}

	c = NULL;
found:
			return c;
	}
	return NULL;
}

int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm)
{