.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * oxfw_proc.c - a part of driver for OXFW970/971 based devices |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2014 Takashi Sakamoto |
---|
5 | | - * |
---|
6 | | - * Licensed under the terms of the GNU General Public License, version 2. |
---|
7 | 6 | */ |
---|
8 | 7 | |
---|
9 | 8 | #include "./oxfw.h" |
---|
.. | .. |
---|
83 | 82 | struct snd_info_entry *entry; |
---|
84 | 83 | |
---|
85 | 84 | entry = snd_info_create_card_entry(oxfw->card, name, root); |
---|
86 | | - if (entry == NULL) |
---|
87 | | - return; |
---|
88 | | - |
---|
89 | | - snd_info_set_text_ops(entry, oxfw, op); |
---|
90 | | - if (snd_info_register(entry) < 0) |
---|
91 | | - snd_info_free_entry(entry); |
---|
| 85 | + if (entry) |
---|
| 86 | + snd_info_set_text_ops(entry, oxfw, op); |
---|
92 | 87 | } |
---|
93 | 88 | |
---|
94 | 89 | void snd_oxfw_proc_init(struct snd_oxfw *oxfw) |
---|
.. | .. |
---|
104 | 99 | if (root == NULL) |
---|
105 | 100 | return; |
---|
106 | 101 | root->mode = S_IFDIR | 0555; |
---|
107 | | - if (snd_info_register(root) < 0) { |
---|
108 | | - snd_info_free_entry(root); |
---|
109 | | - return; |
---|
110 | | - } |
---|
111 | 102 | |
---|
112 | 103 | add_node(oxfw, root, "formation", proc_read_formation); |
---|
113 | 104 | } |
---|