summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-04 16:17:23 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-07-04 15:54:29 +0200
commitd1dbf12e3be0befcd3fd1f978202c5f72d2cc67b (patch)
tree93321567f8e229a45b495086871e54107f4f48a8 /net/bluetooth/mgmt.c
parent99a6768e0e55d19a47934ccd653ff0f9b3236401 (diff)
downloadlinux-stable-d1dbf12e3be0befcd3fd1f978202c5f72d2cc67b.tar.gz
linux-stable-d1dbf12e3be0befcd3fd1f978202c5f72d2cc67b.tar.bz2
linux-stable-d1dbf12e3be0befcd3fd1f978202c5f72d2cc67b.zip
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: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index f1672b15c0f3..90eabcae3ed2 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5225,7 +5225,7 @@ static int remove_device(struct sock *sk, struct hci_dev *hdev,
goto unlock;
}
- list_del_init(&params->action);
+ list_del(&params->action);
list_del(&params->list);
kfree(params);
hci_update_background_scan(hdev);