提交 d1dbf12e 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Use list_del when freeing the list entry

It's wasteful to use list_del_init (which re-initializes the list_head)
if we're just about to free the element and never use it again.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 99a6768e
...@@ -5225,7 +5225,7 @@ static int remove_device(struct sock *sk, struct hci_dev *hdev, ...@@ -5225,7 +5225,7 @@ static int remove_device(struct sock *sk, struct hci_dev *hdev,
goto unlock; goto unlock;
} }
list_del_init(&params->action); list_del(&params->action);
list_del(&params->list); list_del(&params->list);
kfree(params); kfree(params);
hci_update_background_scan(hdev); hci_update_background_scan(hdev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册