X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=sound%2Fcore%2Finit.c;h=57b792e2439a0f9b939c5789d7c23678ff8377bc;hp=f7c3df8b521b2c85db5771a68acf27f981084aae;hb=33081adf8b89d5a716d7e1c60171768d39795b39;hpb=c55960499f810357a29659b32d6ea594abee9237 diff --git a/sound/core/init.c b/sound/core/init.c index f7c3df8b521b..57b792e2439a 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -604,11 +604,16 @@ card_id_store_attr(struct device *dev, struct device_attribute *attr, return -EEXIST; } for (idx = 0; idx < snd_ecards_limit; idx++) { - if (snd_cards[idx] && !strcmp(snd_cards[idx]->id, buf1)) - goto __exist; + if (snd_cards[idx] && !strcmp(snd_cards[idx]->id, buf1)) { + if (card == snd_cards[idx]) + goto __ok; + else + goto __exist; + } } strcpy(card->id, buf1); snd_info_card_id_change(card); +__ok: mutex_unlock(&snd_card_mutex); return count;