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>
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index f1672b1..90eabca 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5225,7 +5225,7 @@
goto unlock;
}
- list_del_init(¶ms->action);
+ list_del(¶ms->action);
list_del(¶ms->list);
kfree(params);
hci_update_background_scan(hdev);