hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/net/wireless/broadcom/b43legacy/sysfs.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23
34 Broadcom B43legacy wireless driver
....@@ -6,20 +7,6 @@
67
78 Copyright (c) 2006 Michael Buesch <m@bues.ch>
89
9
- This program is free software; you can redistribute it and/or modify
10
- it under the terms of the GNU General Public License as published by
11
- the Free Software Foundation; either version 2 of the License, or
12
- (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU General Public License for more details.
18
-
19
- You should have received a copy of the GNU General Public License
20
- along with this program; see the file COPYING. If not, write to
21
- the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
22
- Boston, MA 02110-1301, USA.
2310
2411 */
2512
....@@ -38,13 +25,15 @@
3825 static int get_integer(const char *buf, size_t count)
3926 {
4027 char tmp[10 + 1] = { 0 };
41
- int ret = -EINVAL;
28
+ int ret = -EINVAL, res;
4229
4330 if (count == 0)
4431 goto out;
4532 count = min_t(size_t, count, 10);
4633 memcpy(tmp, buf, count);
47
- ret = simple_strtol(tmp, NULL, 10);
34
+ ret = kstrtoint(tmp, 10, &res);
35
+ if (!ret)
36
+ return res;
4837 out:
4938 return ret;
5039 }
....@@ -143,7 +132,6 @@
143132 if (err)
144133 b43legacyerr(wldev->wl, "Interference Mitigation not "
145134 "supported by device\n");
146
- mmiowb();
147135 spin_unlock_irqrestore(&wldev->wl->irq_lock, flags);
148136 mutex_unlock(&wldev->wl->mutex);
149137