X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=sound%2Fcore%2Finit.c;h=57b792e2439a0f9b939c5789d7c23678ff8377bc;hb=8be4eed0ea7d8ef38692de878043a949e9db16e8;hp=f7c3df8b521b2c85db5771a68acf27f981084aae;hpb=8de547e1824437f3c6af180d3ed2162fa4b3f389;p=mirror_ubuntu-bionic-kernel.git 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;