Skip to content

Commit fe4408d

Browse files
visitorckwVudentz
authored andcommitted
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 <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent 2fcb793 commit fe4408d

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

net/bluetooth/hci_conn.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,7 +778,6 @@ static int hci_le_big_terminate(struct hci_dev *hdev, u8 big, struct hci_conn *c
778778
if (!d)
779779
return -ENOMEM;
780780

781-
memset(d, 0, sizeof(*d));
782781
d->big = big;
783782
d->sync_handle = conn->sync_handle;
784783

0 commit comments

Comments
 (0)