Commit 7b25c9b3 authored by Johan Hedberg's avatar Johan Hedberg

Bluetooth: Remove unnecessary check for chan->psm

Now that ATT sockets have been converted to use the new L2CAP_CHAN_FIXED
type there is no need to have an extra check for chan->psm in the
l2cap_chan_close function.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent d7e5e76b
...@@ -666,10 +666,7 @@ void l2cap_chan_close(struct l2cap_chan *chan, int reason) ...@@ -666,10 +666,7 @@ void l2cap_chan_close(struct l2cap_chan *chan, int reason)
case BT_CONNECTED: case BT_CONNECTED:
case BT_CONFIG: case BT_CONFIG:
/* ATT uses L2CAP_CHAN_CONN_ORIENTED so we must also if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED) {
* check for chan->psm.
*/
if (chan->chan_type == L2CAP_CHAN_CONN_ORIENTED && chan->psm) {
__set_chan_timer(chan, chan->ops->get_sndtimeo(chan)); __set_chan_timer(chan, chan->ops->get_sndtimeo(chan));
l2cap_send_disconn_req(chan, reason); l2cap_send_disconn_req(chan, reason);
} else } else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment