forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/firewire/fireworks/fireworks_proc.c
....@@ -1,10 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * fireworks_proc.c - a part of driver for Fireworks based devices
34 *
45 * Copyright (c) 2009-2010 Clemens Ladisch
56 * Copyright (c) 2013-2014 Takashi Sakamoto
6
- *
7
- * Licensed under the terms of the GNU General Public License, version 2.
87 */
98
109 #include "./fireworks.h"
....@@ -199,12 +198,8 @@
199198 struct snd_info_entry *entry;
200199
201200 entry = snd_info_create_card_entry(efw->card, name, root);
202
- if (entry == NULL)
203
- return;
204
-
205
- snd_info_set_text_ops(entry, efw, op);
206
- if (snd_info_register(entry) < 0)
207
- snd_info_free_entry(entry);
201
+ if (entry)
202
+ snd_info_set_text_ops(entry, efw, op);
208203 }
209204
210205 void snd_efw_proc_init(struct snd_efw *efw)
....@@ -220,10 +215,6 @@
220215 if (root == NULL)
221216 return;
222217 root->mode = S_IFDIR | 0555;
223
- if (snd_info_register(root) < 0) {
224
- snd_info_free_entry(root);
225
- return;
226
- }
227218
228219 add_node(efw, root, "clock", proc_read_clock);
229220 add_node(efw, root, "firmware", proc_read_hwinfo);