Bluetooth: Call L2CAP teardown callback before clearing chan->conn
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 8 Aug 2014 06:28:03 +0000 (09:28 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 14 Aug 2014 06:49:15 +0000 (08:49 +0200)
commit72847ce02180e8a0be1b23ba53ffe437cdb25d6a
tree09564eb642ae64ff9ecc966c5946568a2f9d769a
parent148243087b3a5d95a32825da26858dc9d893b141
Bluetooth: Call L2CAP teardown callback before clearing chan->conn

L2CAP channel implementations may want to still access the chan->conn
pointer. This will particularly be the case for SMP that will want to
clear a reference to the SMP channel in the l2cap_conn structure. The
only user of the teardown callback so far is l2cap_sock.c and for the
code there it makes no difference whether the callback is called before
or after clearing the chan->conn pointer.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/l2cap_core.c