OSDN Git Service

Bluetooth: Use kzalloc instead of kmalloc/memset
authorJiapeng Chong <jiapeng.chong@linux.alibaba.com>
Mon, 17 Oct 2022 05:47:13 +0000 (13:47 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 12 Dec 2022 22:19:23 +0000 (14:19 -0800)
commit37224a290853a69f7e8e8c2269c9caea6e2bcb4b
tree127eb878373e0daad8f5e433d196918c49da6a54
parente9b3e5b8c65733f626a7ee919c4bc895b51d7bb2
Bluetooth: Use kzalloc instead of kmalloc/memset

Use kzalloc rather than duplicating its implementation, which makes code
simple and easy to understand.

./net/bluetooth/hci_conn.c:2038:6-13: WARNING: kzalloc should be used for cp, instead of kmalloc/memset.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2406
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/hci_conn.c