]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
Bluetooth: hci_conn: Use kmemdup() to replace kzalloc + memcpy
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Sun, 25 Jun 2023 08:45:13 +0000 (16:45 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:04 +0000 (09:48 +0200)
commitf550c6973e4be7f3ed1856afbe7969f95446e6a9
tree93a0f46e70f8c295b54a49cca82a64d5e47103a0
parent25675624455e8e881cdae9fd08cfec3957be72c0
Bluetooth: hci_conn: Use kmemdup() to replace kzalloc + memcpy

[ Upstream commit 5b6d345d1b65d67624349e5de22227492c637576 ]

Use kmemdup rather than duplicating its implementation.

./net/bluetooth/hci_conn.c:1880:7-14: WARNING opportunity for kmemdup.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=5597
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Stable-dep-of: a09128921820 ("Bluetooth: hci_conn: Fix hci_le_set_cig_params")
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_conn.c