| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * fireworks_proc.c - a part of driver for Fireworks based devices |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2009-2010 Clemens Ladisch |
|---|
| 5 | 6 | * Copyright (c) 2013-2014 Takashi Sakamoto |
|---|
| 6 | | - * |
|---|
| 7 | | - * Licensed under the terms of the GNU General Public License, version 2. |
|---|
| 8 | 7 | */ |
|---|
| 9 | 8 | |
|---|
| 10 | 9 | #include "./fireworks.h" |
|---|
| .. | .. |
|---|
| 199 | 198 | struct snd_info_entry *entry; |
|---|
| 200 | 199 | |
|---|
| 201 | 200 | 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); |
|---|
| 208 | 203 | } |
|---|
| 209 | 204 | |
|---|
| 210 | 205 | void snd_efw_proc_init(struct snd_efw *efw) |
|---|
| .. | .. |
|---|
| 220 | 215 | if (root == NULL) |
|---|
| 221 | 216 | return; |
|---|
| 222 | 217 | root->mode = S_IFDIR | 0555; |
|---|
| 223 | | - if (snd_info_register(root) < 0) { |
|---|
| 224 | | - snd_info_free_entry(root); |
|---|
| 225 | | - return; |
|---|
| 226 | | - } |
|---|
| 227 | 218 | |
|---|
| 228 | 219 | add_node(efw, root, "clock", proc_read_clock); |
|---|
| 229 | 220 | add_node(efw, root, "firmware", proc_read_hwinfo); |
|---|