From: Zhao Dongdong <zhaodongdong@kylinos.cn>
In sco_conn_add(), conn->mtu is first assigned hcon->mtu
unconditionally, then immediately overwritten by the subsequent
if/else block which either assigns hcon->mtu again (when
hcon->mtu > 0) or sets it to 60. The first assignment is dead
code and can be safely removed.
Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn>
---
net/bluetooth/sco.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index c05f79b7aa31..e4f0f6fb01de 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -212,7 +212,6 @@ static struct sco_conn *sco_conn_add(struct hci_conn *hcon)
hcon->sco_data = conn;
conn->hcon = hcon;
- conn->mtu = hcon->mtu;
if (hcon->mtu > 0)
conn->mtu = hcon->mtu;
--
2.25.1