[PATCH] Bluetooth: sco: Remove redundant mtu assignment in sco_conn_add()

Zhao Dongdong <[email protected]>
Newsgroups org.kernel.vger.linux-bluetooth,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
From: Zhao Dongdong <[email protected]>

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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.