forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-02-19 1c055e55a242a33e574e48be530e06770a210dcd
kernel/drivers/net/wireless/ti/wl12xx/debugfs.c
....@@ -1,23 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * This file is part of wl12xx
34 *
45 * Copyright (C) 2009 Nokia Corporation
56 * Copyright (C) 2011-2012 Texas Instruments
6
- *
7
- * This program is free software; you can redistribute it and/or
8
- * modify it under the terms of the GNU General Public License
9
- * version 2 as published by the Free Software Foundation.
10
- *
11
- * This program is distributed in the hope that it will be useful, but
12
- * WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
- * General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
19
- * 02110-1301 USA
20
- *
217 */
228
239 #include "../wlcore/debugfs.h"
....@@ -125,20 +111,10 @@
125111 int wl12xx_debugfs_add_files(struct wl1271 *wl,
126112 struct dentry *rootdir)
127113 {
128
- int ret = 0;
129
- struct dentry *entry, *stats, *moddir;
114
+ struct dentry *stats, *moddir;
130115
131116 moddir = debugfs_create_dir(KBUILD_MODNAME, rootdir);
132
- if (!moddir || IS_ERR(moddir)) {
133
- entry = moddir;
134
- goto err;
135
- }
136
-
137117 stats = debugfs_create_dir("fw_stats", moddir);
138
- if (!stats || IS_ERR(stats)) {
139
- entry = stats;
140
- goto err;
141
- }
142118
143119 DEBUGFS_FWSTATS_ADD(tx, internal_desc_overflow);
144120
....@@ -232,12 +208,4 @@
232208 DEBUGFS_FWSTATS_ADD(rxpipe, tx_xfr_host_int_trig_rx_data);
233209
234210 return 0;
235
-
236
-err:
237
- if (IS_ERR(entry))
238
- ret = PTR_ERR(entry);
239
- else
240
- ret = -ENOMEM;
241
-
242
- return ret;
243211 }