diff options
-rw-r--r-- | sound/core/info.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/info.c b/sound/core/info.c index c8a413d6cc9b..566279374683 100644 --- a/sound/core/info.c +++ b/sound/core/info.c | |||
@@ -738,13 +738,12 @@ EXPORT_SYMBOL(snd_info_create_card_entry); | |||
738 | 738 | ||
739 | static void snd_info_disconnect(struct snd_info_entry *entry) | 739 | static void snd_info_disconnect(struct snd_info_entry *entry) |
740 | { | 740 | { |
741 | struct snd_info_entry *p, *n; | 741 | struct snd_info_entry *p; |
742 | 742 | ||
743 | if (!entry->p) | 743 | if (!entry->p) |
744 | return; | 744 | return; |
745 | list_for_each_entry_safe(p, n, &entry->children, list) | 745 | list_for_each_entry(p, &entry->children, list) |
746 | snd_info_disconnect(p); | 746 | snd_info_disconnect(p); |
747 | list_del_init(&entry->list); | ||
748 | proc_remove(entry->p); | 747 | proc_remove(entry->p); |
749 | entry->p = NULL; | 748 | entry->p = NULL; |
750 | } | 749 | } |
@@ -771,6 +770,7 @@ void snd_info_free_entry(struct snd_info_entry * entry) | |||
771 | list_for_each_entry_safe(p, n, &entry->children, list) | 770 | list_for_each_entry_safe(p, n, &entry->children, list) |
772 | snd_info_free_entry(p); | 771 | snd_info_free_entry(p); |
773 | 772 | ||
773 | list_del(&entry->list); | ||
774 | kfree(entry->name); | 774 | kfree(entry->name); |
775 | if (entry->private_free) | 775 | if (entry->private_free) |
776 | entry->private_free(entry); | 776 | entry->private_free(entry); |