forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/net/wimax/i2400m/driver.c
....@@ -1,25 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Intel Wireless WiMAX Connection 2400m
34 * Generic probe/disconnect, reset and message passing
45 *
5
- *
66 * Copyright (C) 2007-2008 Intel Corporation <linux-wimax@intel.com>
77 * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
8
- *
9
- * This program is free software; you can redistribute it and/or
10
- * modify it under the terms of the GNU General Public License version
11
- * 2 as published by the Free Software Foundation.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, write to the Free Software
20
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21
- * 02110-1301, USA.
22
- *
238 *
249 * See i2400m.h for driver documentation. This contains helpers for
2510 * the driver model glue [_setup()/_release()], handling device resets
....@@ -755,9 +740,6 @@
755740 static
756741 int i2400m_bm_buf_alloc(struct i2400m *i2400m)
757742 {
758
- int result;
759
-
760
- result = -ENOMEM;
761743 i2400m->bm_cmd_buf = kzalloc(I2400M_BM_CMD_BUF_SIZE, GFP_KERNEL);
762744 if (i2400m->bm_cmd_buf == NULL)
763745 goto error_bm_cmd_kzalloc;
....@@ -769,7 +751,7 @@
769751 error_bm_ack_buf_kzalloc:
770752 kfree(i2400m->bm_cmd_buf);
771753 error_bm_cmd_kzalloc:
772
- return result;
754
+ return -ENOMEM;
773755 }
774756
775757
....@@ -858,7 +840,7 @@
858840 */
859841 int i2400m_setup(struct i2400m *i2400m, enum i2400m_bri bm_flags)
860842 {
861
- int result = -ENODEV;
843
+ int result;
862844 struct device *dev = i2400m_dev(i2400m);
863845 struct wimax_dev *wimax_dev = &i2400m->wimax_dev;
864846 struct net_device *net_dev = i2400m->wimax_dev.net_dev;
....@@ -920,11 +902,7 @@
920902 goto error_sysfs_setup;
921903 }
922904
923
- result = i2400m_debugfs_add(i2400m);
924
- if (result < 0) {
925
- dev_err(dev, "cannot setup i2400m's debugfs: %d\n", result);
926
- goto error_debugfs_setup;
927
- }
905
+ i2400m_debugfs_add(i2400m);
928906
929907 result = i2400m_dev_start(i2400m, bm_flags);
930908 if (result < 0)
....@@ -934,7 +912,6 @@
934912
935913 error_dev_start:
936914 i2400m_debugfs_rm(i2400m);
937
-error_debugfs_setup:
938915 sysfs_remove_group(&i2400m->wimax_dev.net_dev->dev.kobj,
939916 &i2400m_dev_attr_group);
940917 error_sysfs_setup: