[ALSA] dbri - Don't return errors without CONFIG_PROC_FS
authorTakashi Iwai <tiwai@suse.de>
Thu, 1 Dec 2005 09:48:37 +0000 (10:48 +0100)
committerJaroslav Kysela <perex@suse.cz>
Tue, 3 Jan 2006 11:30:06 +0000 (12:30 +0100)
Modules: SPARC DBRI driver

Don't return errors if the proc file can't be created (for the case
without CONFIG_PROC_FS).

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/sparc/dbri.c

index 293108ee72994272797e62ce3d19d4ec0cb4c957..2164b7d290c7c0234a30c0b7ebd96ed1547c8908 100644 (file)
@@ -2519,15 +2519,15 @@ static void dbri_debug_read(struct snd_info_entry * entry,
 void snd_dbri_proc(struct snd_dbri * dbri)
 {
        struct snd_info_entry *entry;
-       int err;
 
-       err = snd_card_proc_new(dbri->card, "regs", &entry);
-       snd_info_set_text_ops(entry, dbri, 1024, dbri_regs_read);
+       if (! snd_card_proc_new(dbri->card, "regs", &entry))
+               snd_info_set_text_ops(entry, dbri, 1024, dbri_regs_read);
 
 #ifdef DBRI_DEBUG
-       err = snd_card_proc_new(dbri->card, "debug", &entry);
-       snd_info_set_text_ops(entry, dbri, 4096, dbri_debug_read);
-       entry->mode = S_IFREG | S_IRUGO;        /* Readable only. */
+       if (! snd_card_proc_new(dbri->card, "debug", &entry)) {
+               snd_info_set_text_ops(entry, dbri, 4096, dbri_debug_read);
+               entry->mode = S_IFREG | S_IRUGO;        /* Readable only. */
+       }
 #endif
 }