forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/sound/firewire/oxfw/oxfw-proc.c
....@@ -1,9 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * oxfw_proc.c - a part of driver for OXFW970/971 based devices
34 *
45 * Copyright (c) 2014 Takashi Sakamoto
5
- *
6
- * Licensed under the terms of the GNU General Public License, version 2.
76 */
87
98 #include "./oxfw.h"
....@@ -83,12 +82,8 @@
8382 struct snd_info_entry *entry;
8483
8584 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);
9287 }
9388
9489 void snd_oxfw_proc_init(struct snd_oxfw *oxfw)
....@@ -104,10 +99,6 @@
10499 if (root == NULL)
105100 return;
106101 root->mode = S_IFDIR | 0555;
107
- if (snd_info_register(root) < 0) {
108
- snd_info_free_entry(root);
109
- return;
110
- }
111102
112103 add_node(oxfw, root, "formation", proc_read_formation);
113104 }