diff options
-rw-r--r-- | sound/core/init.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c index ec4a50ce5656..2de45fbd70fb 100644 --- a/sound/core/init.c +++ b/sound/core/init.c | |||
@@ -607,11 +607,16 @@ card_id_store_attr(struct device *dev, struct device_attribute *attr, | |||
607 | return -EEXIST; | 607 | return -EEXIST; |
608 | } | 608 | } |
609 | for (idx = 0; idx < snd_ecards_limit; idx++) { | 609 | for (idx = 0; idx < snd_ecards_limit; idx++) { |
610 | if (snd_cards[idx] && !strcmp(snd_cards[idx]->id, buf1)) | 610 | if (snd_cards[idx] && !strcmp(snd_cards[idx]->id, buf1)) { |
611 | goto __exist; | 611 | if (card == snd_cards[idx]) |
612 | goto __ok; | ||
613 | else | ||
614 | goto __exist; | ||
615 | } | ||
612 | } | 616 | } |
613 | strcpy(card->id, buf1); | 617 | strcpy(card->id, buf1); |
614 | snd_info_card_id_change(card); | 618 | snd_info_card_id_change(card); |
619 | __ok: | ||
615 | mutex_unlock(&snd_card_mutex); | 620 | mutex_unlock(&snd_card_mutex); |
616 | 621 | ||
617 | return count; | 622 | return count; |