public inbox for alsa-devel@alsa-project.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ALSA: core: Fix regression for ELD/codec information files
@ 2015-05-13  8:36 han.lu
  2015-05-18  7:54 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: han.lu @ 2015-05-13  8:36 UTC (permalink / raw)
  To: tiwai, alsa-devel, libin.yang, mengdong.lin; +Cc: Lu, Han

From: "Lu, Han" <han.lu@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@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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-18  7:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-13  8:36 [PATCH 1/1] ALSA: core: Fix regression for ELD/codec information files han.lu
2015-05-18  7:54 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox