summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-02-04 14:55:19 +0100
committerTakashi Iwai <tiwai@suse.de>2019-02-06 18:11:54 +0100
commit4a471d7cc99d6a2f7c58d11c3f1a9665ca60dcd6 (patch)
tree272a9d888f8c0e40f6cb3cf6b8753d5b93de0c78 /sound/core
parenta8d149813b4456b689effb1f10accdc937566703 (diff)
downloadlwn-4a471d7cc99d6a2f7c58d11c3f1a9665ca60dcd6.tar.gz
lwn-4a471d7cc99d6a2f7c58d11c3f1a9665ca60dcd6.zip
ALSA: compress: Remove superfluous snd_info_register() calls
The calls of snd_info_register() are superfluous and should be avoided at the procfs creation time. They are called at the end of the whole initialization via snd_card_register(). This patch drops such superfluous calls. Reviewed-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/compress_offload.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c
index f7d2b373da0a..a1a6fd75cfe5 100644
--- a/sound/core/compress_offload.c
+++ b/sound/core/compress_offload.c
@@ -1015,22 +1015,13 @@ static int snd_compress_proc_init(struct snd_compr *compr)
if (!entry)
return -ENOMEM;
entry->mode = S_IFDIR | 0555;
- if (snd_info_register(entry) < 0) {
- snd_info_free_entry(entry);
- return -ENOMEM;
- }
compr->proc_root = entry;
entry = snd_info_create_card_entry(compr->card, "info",
compr->proc_root);
- if (entry) {
+ if (entry)
snd_info_set_text_ops(entry, compr,
snd_compress_proc_info_read);
- if (snd_info_register(entry) < 0) {
- snd_info_free_entry(entry);
- entry = NULL;
- }
- }
compr->proc_info_entry = entry;
return 0;