Commit 9650e2ee authored by Dave Jones's avatar Dave Jones

[PATCH] More list_del_init usage increases

parent d4f4d3ac
...@@ -3841,8 +3841,7 @@ static void usb_audio_disconnect(struct usb_interface *intf) ...@@ -3841,8 +3841,7 @@ static void usb_audio_disconnect(struct usb_interface *intf)
return; return;
} }
down(&open_sem); down(&open_sem);
list_del(&s->audiodev); list_del_init(&s->audiodev);
INIT_LIST_HEAD(&s->audiodev);
s->usbdev = NULL; s->usbdev = NULL;
dev_set_drvdata (&intf->dev, NULL); dev_set_drvdata (&intf->dev, NULL);
......
...@@ -158,8 +158,7 @@ static inline void insert_hash(struct hfs_cat_entry *entry) ...@@ -158,8 +158,7 @@ static inline void insert_hash(struct hfs_cat_entry *entry)
static inline void remove_hash(struct hfs_cat_entry *entry) static inline void remove_hash(struct hfs_cat_entry *entry)
{ {
list_del(&entry->hash); list_del_init(&entry->hash);
INIT_LIST_HEAD(&entry->hash);
} }
/* /*
...@@ -223,8 +222,7 @@ static void delete_entry(struct hfs_cat_entry *entry) ...@@ -223,8 +222,7 @@ static void delete_entry(struct hfs_cat_entry *entry)
{ {
if (!(entry->state & HFS_DELETED)) { if (!(entry->state & HFS_DELETED)) {
entry->state |= HFS_DELETED; entry->state |= HFS_DELETED;
list_del(&entry->hash); list_del_init(&entry->hash);
INIT_LIST_HEAD(&entry->hash);
if (entry->type == HFS_CDR_FIL) { if (entry->type == HFS_CDR_FIL) {
/* free all extents */ /* free all extents */
...@@ -836,8 +834,7 @@ static void invalidate_list(struct list_head *head, struct hfs_mdb *mdb, ...@@ -836,8 +834,7 @@ static void invalidate_list(struct list_head *head, struct hfs_mdb *mdb,
} }
if (!entry->count) { if (!entry->count) {
list_del(&entry->hash); list_del_init(&entry->hash);
INIT_LIST_HEAD(&entry->hash);
list_del(&entry->list); list_del(&entry->list);
list_add(&entry->list, dispose); list_add(&entry->list, dispose);
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment