.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * tascam-proc.h - a part of driver for TASCAM FireWire series |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2015 Takashi Sakamoto |
---|
5 | | - * |
---|
6 | | - * Licensed under the terms of the GNU General Public License, version 2. |
---|
7 | 6 | */ |
---|
8 | 7 | |
---|
9 | 8 | #include "./tascam.h" |
---|
.. | .. |
---|
58 | 57 | struct snd_info_entry *entry; |
---|
59 | 58 | |
---|
60 | 59 | entry = snd_info_create_card_entry(tscm->card, name, root); |
---|
61 | | - if (entry == NULL) |
---|
62 | | - return; |
---|
63 | | - |
---|
64 | | - snd_info_set_text_ops(entry, tscm, op); |
---|
65 | | - if (snd_info_register(entry) < 0) |
---|
66 | | - snd_info_free_entry(entry); |
---|
| 60 | + if (entry) |
---|
| 61 | + snd_info_set_text_ops(entry, tscm, op); |
---|
67 | 62 | } |
---|
68 | 63 | |
---|
69 | 64 | void snd_tscm_proc_init(struct snd_tscm *tscm) |
---|
.. | .. |
---|
79 | 74 | if (root == NULL) |
---|
80 | 75 | return; |
---|
81 | 76 | root->mode = S_IFDIR | 0555; |
---|
82 | | - if (snd_info_register(root) < 0) { |
---|
83 | | - snd_info_free_entry(root); |
---|
84 | | - return; |
---|
85 | | - } |
---|
86 | 77 | |
---|
87 | 78 | add_node(tscm, root, "firmware", proc_read_firmware); |
---|
88 | 79 | } |
---|