.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * digi00x-proc.c - a part of driver for Digidesign Digi 002/003 family |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) 2014-2015 Takashi Sakamoto |
---|
5 | | - * |
---|
6 | | - * Licensed under the terms of the GNU General Public License, version 2. |
---|
7 | 6 | */ |
---|
8 | 7 | |
---|
9 | 8 | #include "digi00x.h" |
---|
.. | .. |
---|
80 | 79 | return; |
---|
81 | 80 | |
---|
82 | 81 | root->mode = S_IFDIR | 0555; |
---|
83 | | - if (snd_info_register(root) < 0) { |
---|
84 | | - snd_info_free_entry(root); |
---|
85 | | - return; |
---|
86 | | - } |
---|
87 | 82 | |
---|
88 | 83 | entry = snd_info_create_card_entry(dg00x->card, "clock", root); |
---|
89 | | - if (entry == NULL) { |
---|
90 | | - snd_info_free_entry(root); |
---|
91 | | - return; |
---|
92 | | - } |
---|
93 | | - |
---|
94 | | - snd_info_set_text_ops(entry, dg00x, proc_read_clock); |
---|
95 | | - if (snd_info_register(entry) < 0) { |
---|
96 | | - snd_info_free_entry(entry); |
---|
97 | | - snd_info_free_entry(root); |
---|
98 | | - } |
---|
| 84 | + if (entry) |
---|
| 85 | + snd_info_set_text_ops(entry, dg00x, proc_read_clock); |
---|
99 | 86 | } |
---|