ASoC: simple_card_utils: fix fallback when "label" property isn't present
[muen/linux.git] / sound / soc / generic / simple-card-utils.c
index 26d64fa40c9cf1438f43a08d8f45b15ac0184fa9..0442099157e60a1f62a59305f94239b99207584a 100644 (file)
@@ -132,7 +132,7 @@ int asoc_simple_card_parse_card_name(struct snd_soc_card *card,
 
        /* Parse the card name from DT */
        ret = snd_soc_of_parse_card_name(card, "label");
-       if (ret < 0) {
+       if (ret < 0 || !card->name) {
                char prop[128];
 
                snprintf(prop, sizeof(prop), "%sname", prefix);