forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/net/wireless/ti/wl18xx/debugfs.c
....@@ -1,23 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * This file is part of wl18xx
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 <linux/pm_runtime.h>
....@@ -422,20 +408,10 @@
422408 int wl18xx_debugfs_add_files(struct wl1271 *wl,
423409 struct dentry *rootdir)
424410 {
425
- int ret = 0;
426
- struct dentry *entry, *stats, *moddir;
411
+ struct dentry *stats, *moddir;
427412
428413 moddir = debugfs_create_dir(KBUILD_MODNAME, rootdir);
429
- if (!moddir || IS_ERR(moddir)) {
430
- entry = moddir;
431
- goto err;
432
- }
433
-
434414 stats = debugfs_create_dir("fw_stats", moddir);
435
- if (!stats || IS_ERR(stats)) {
436
- entry = stats;
437
- goto err;
438
- }
439415
440416 DEBUGFS_ADD(clear_fw_stats, stats);
441417
....@@ -590,12 +566,4 @@
590566 DEBUGFS_ADD(dynamic_fw_traces, moddir);
591567
592568 return 0;
593
-
594
-err:
595
- if (IS_ERR(entry))
596
- ret = PTR_ERR(entry);
597
- else
598
- ret = -ENOMEM;
599
-
600
- return ret;
601569 }