[alsa-devel] [PATCH 1/1] ALSA: core: Fix regression for ELD/codec information files

han.lu at intel.com han.lu at intel.com
Wed May 13 10:36:33 CEST 2015


From: "Lu, Han" <han.lu at intel.com>

The commit c560a6797e3b ("ALSA: core: Remove child proc file elements
recursively") introduced a regression that ELD/codec information files
can not be found on /proc/asound/cardX/. This patch corrects it.

Signed-off-by: Lu, Han <han.lu at intel.com>

diff --git a/include/sound/info.h b/include/sound/info.h
index 1626995..ae8d30a 100644
--- a/include/sound/info.h
+++ b/include/sound/info.h
@@ -149,6 +149,10 @@ static inline int snd_card_proc_new(struct snd_card *card, const char *name,
 				    struct snd_info_entry **entryp)
 {
 	*entryp = snd_info_create_card_entry(card, name, card->proc_root);
+	if (snd_info_register(*entryp) < 0) {
+		snd_info_free_entry(*entryp);
+		*entryp = NULL;
+	}
 	return *entryp ? 0 : -ENOMEM;
 }
 
-- 
1.9.1



More information about the Alsa-devel mailing list