[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240810141415.124113-1-visitorckw@gmail.com>
Date: Sat, 10 Aug 2024 22:14:15 +0800
From: Kuan-Wei Chiu <visitorckw@...il.com>
To: marcel@...tmann.org,
johan.hedberg@...il.com,
luiz.dentz@...il.com
Cc: jserv@...s.ncku.edu.tw,
linux-bluetooth@...r.kernel.org,
linux-kernel@...r.kernel.org,
Kuan-Wei Chiu <visitorckw@...il.com>
Subject: [PATCH] Bluetooth: hci_conn: Remove redundant memset after kzalloc
Since kzalloc already zeroes the allocated memory, the subsequent
memset call is unnecessary. This patch removes the redundant memset to
clean up the code and enhance efficiency.
Signed-off-by: Kuan-Wei Chiu <visitorckw@...il.com>
---
Note: Build test only.
net/bluetooth/hci_conn.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 8e48ccd2af30..8f0c9322eadb 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -778,7 +778,6 @@ static int hci_le_big_terminate(struct hci_dev *hdev, u8 big, struct hci_conn *c
if (!d)
return -ENOMEM;
- memset(d, 0, sizeof(*d));
d->big = big;
d->sync_handle = conn->sync_handle;
--
2.34.1
Powered by blists - more mailing lists