From: Kuan-Wei Chiu Date: Sat, 10 Aug 2024 14:14:15 +0000 (+0800) Subject: Bluetooth: hci_conn: Remove redundant memset after kzalloc X-Git-Tag: v6.12-rc1~232^2~19^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe4408da5bfd495e0eeea684932a267254f76f11;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Luiz Augusto von Dentz --- diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index c82502e213a88..323d397b0e920 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;