.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * dice_proc.c - a part of driver for Dice based devices |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) Clemens Ladisch |
---|
5 | 6 | * Copyright (c) 2014 Takashi Sakamoto |
---|
6 | | - * |
---|
7 | | - * Licensed under the terms of the GNU General Public License, version 2. |
---|
8 | 7 | */ |
---|
9 | 8 | |
---|
10 | 9 | #include "dice.h" |
---|
.. | .. |
---|
285 | 284 | struct snd_info_entry *entry; |
---|
286 | 285 | |
---|
287 | 286 | 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); |
---|
294 | 289 | } |
---|
295 | 290 | |
---|
296 | 291 | void snd_dice_create_proc(struct snd_dice *dice) |
---|
.. | .. |
---|
306 | 301 | if (!root) |
---|
307 | 302 | return; |
---|
308 | 303 | root->mode = S_IFDIR | 0555; |
---|
309 | | - if (snd_info_register(root) < 0) { |
---|
310 | | - snd_info_free_entry(root); |
---|
311 | | - return; |
---|
312 | | - } |
---|
313 | 304 | |
---|
314 | 305 | add_node(dice, root, "dice", dice_proc_read); |
---|
315 | 306 | add_node(dice, root, "formation", dice_proc_read_formation); |
---|