forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/sound/firewire/dice/dice-proc.c
....@@ -1,10 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * dice_proc.c - a part of driver for Dice based devices
34 *
45 * Copyright (c) Clemens Ladisch
56 * Copyright (c) 2014 Takashi Sakamoto
6
- *
7
- * Licensed under the terms of the GNU General Public License, version 2.
87 */
98
109 #include "dice.h"
....@@ -285,12 +284,8 @@
285284 struct snd_info_entry *entry;
286285
287286 entry = snd_info_create_card_entry(dice->card, name, root);
288
- if (!entry)
289
- return;
290
-
291
- snd_info_set_text_ops(entry, dice, op);
292
- if (snd_info_register(entry) < 0)
293
- snd_info_free_entry(entry);
287
+ if (entry)
288
+ snd_info_set_text_ops(entry, dice, op);
294289 }
295290
296291 void snd_dice_create_proc(struct snd_dice *dice)
....@@ -306,10 +301,6 @@
306301 if (!root)
307302 return;
308303 root->mode = S_IFDIR | 0555;
309
- if (snd_info_register(root) < 0) {
310
- snd_info_free_entry(root);
311
- return;
312
- }
313304
314305 add_node(dice, root, "dice", dice_proc_read);
315306 add_node(dice, root, "formation", dice_proc_read_formation);