.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * bebob_proc.c - a part of driver for BeBoB based devices |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2013-2014 Takashi Sakamoto |
---|
5 | | - * |
---|
6 | | - * Licensed under the terms of the GNU General Public License, version 2. |
---|
7 | 6 | */ |
---|
8 | 7 | |
---|
9 | 8 | #include "./bebob.h" |
---|
.. | .. |
---|
163 | 162 | struct snd_info_entry *entry; |
---|
164 | 163 | |
---|
165 | 164 | entry = snd_info_create_card_entry(bebob->card, name, root); |
---|
166 | | - if (entry == NULL) |
---|
167 | | - return; |
---|
168 | | - |
---|
169 | | - snd_info_set_text_ops(entry, bebob, op); |
---|
170 | | - if (snd_info_register(entry) < 0) |
---|
171 | | - snd_info_free_entry(entry); |
---|
| 165 | + if (entry) |
---|
| 166 | + snd_info_set_text_ops(entry, bebob, op); |
---|
172 | 167 | } |
---|
173 | 168 | |
---|
174 | 169 | void snd_bebob_proc_init(struct snd_bebob *bebob) |
---|
.. | .. |
---|
184 | 179 | if (root == NULL) |
---|
185 | 180 | return; |
---|
186 | 181 | root->mode = S_IFDIR | 0555; |
---|
187 | | - if (snd_info_register(root) < 0) { |
---|
188 | | - snd_info_free_entry(root); |
---|
189 | | - return; |
---|
190 | | - } |
---|
191 | 182 | |
---|
192 | 183 | add_node(bebob, root, "clock", proc_read_clock); |
---|
193 | 184 | add_node(bebob, root, "firmware", proc_read_hw_info); |
---|