Bluetooth: L2CAP: Fix regression with move to k_sem API
k_sem_take return differ from nano_sem_take since it return 0 for successful case instead of 1. Change-Id: Ia39cd624d56dbc1c8e7f3558244bebf765da191d Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
8217bb1ef6
commit
1bbb31e201
1 changed files with 1 additions and 1 deletions
|
@ -1251,7 +1251,7 @@ static void l2cap_chan_le_recv(struct bt_l2cap_le_chan *chan,
|
||||||
{
|
{
|
||||||
uint16_t sdu_len;
|
uint16_t sdu_len;
|
||||||
|
|
||||||
if (!k_sem_take(&chan->rx.credits, K_NO_WAIT)) {
|
if (k_sem_take(&chan->rx.credits, K_NO_WAIT)) {
|
||||||
BT_ERR("No credits to receive packet");
|
BT_ERR("No credits to receive packet");
|
||||||
bt_l2cap_chan_disconnect(&chan->chan);
|
bt_l2cap_chan_disconnect(&chan->chan);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue