All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: sco: Remove redundant mtu assignment in sco_conn_add()
@ 2026-07-21  8:12 Zhao Dongdong
  2026-07-21  9:32 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Zhao Dongdong @ 2026-07-21  8:12 UTC (permalink / raw)
  To: marcel, luiz.dentz; +Cc: linux-bluetooth, linux-kernel, Zhao Dongdong

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-07-21  9:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-21  8:12 [PATCH] Bluetooth: sco: Remove redundant mtu assignment in sco_conn_add() Zhao Dongdong
2026-07-21  9:32 ` bluez.test.bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.