Bluetooth: ATT: Fix bogus CONTAINER_OF() usage
This CONTAINER_OF() worked by chance, but was actually wrong, since it makes it look like bt_l2cap_le_chan is the parent container of bt_att. Instead bt_l2cap_le_chan is simply a member of bt_att, i.e. we can dereference it directly. Change-Id: I7307517bae823e54b45db31f75462655ce6eb50d Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
e2eb446b7b
commit
ea9a067a9a
1 changed files with 1 additions and 2 deletions
|
@ -1921,8 +1921,7 @@ static void att_reset(struct bt_att *att)
|
||||||
static void att_timeout(struct k_work *work)
|
static void att_timeout(struct k_work *work)
|
||||||
{
|
{
|
||||||
struct bt_att *att = CONTAINER_OF(work, struct bt_att, timeout_work);
|
struct bt_att *att = CONTAINER_OF(work, struct bt_att, timeout_work);
|
||||||
struct bt_l2cap_le_chan *ch =
|
struct bt_l2cap_le_chan *ch = &att->chan;
|
||||||
CONTAINER_OF(att, struct bt_l2cap_le_chan, chan);
|
|
||||||
|
|
||||||
BT_ERR("ATT Timeout");
|
BT_ERR("ATT Timeout");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue