Skip to content

Commit

Permalink
Bluetooth: AMP: Remove dead code
Browse files Browse the repository at this point in the history
Remove code which cannot execute. l2cap_conn_add for AMP_LINK
might only be invoked when receiving data in l2cap_recv_acldata.
But this case is checked in the first statement there.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
  • Loading branch information
Andrei Emeltchenko authored and Gustavo Padovan committed Jan 9, 2013
1 parent 7a9898c commit cbf54ad
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,17 +1527,12 @@ static struct l2cap_conn *l2cap_conn_add(struct hci_conn *hcon, u8 status)
BT_DBG("hcon %p conn %p hchan %p", hcon, conn, hchan);

switch (hcon->type) {
case AMP_LINK:
conn->mtu = hcon->hdev->block_mtu;
break;

case LE_LINK:
if (hcon->hdev->le_mtu) {
conn->mtu = hcon->hdev->le_mtu;
break;
}
/* fall through */

default:
conn->mtu = hcon->hdev->acl_mtu;
break;
Expand Down

0 comments on commit cbf54ad

Please sign in to comment.