diff options
-rw-r--r-- | sound/sparc/dbri.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 293108ee7299..2164b7d290c7 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c @@ -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 } |