.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | |
---|
3 | 4 | Broadcom B43legacy wireless driver |
---|
.. | .. |
---|
6 | 7 | |
---|
7 | 8 | Copyright (c) 2006 Michael Buesch <m@bues.ch> |
---|
8 | 9 | |
---|
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. |
---|
23 | 10 | |
---|
24 | 11 | */ |
---|
25 | 12 | |
---|
.. | .. |
---|
38 | 25 | static int get_integer(const char *buf, size_t count) |
---|
39 | 26 | { |
---|
40 | 27 | char tmp[10 + 1] = { 0 }; |
---|
41 | | - int ret = -EINVAL; |
---|
| 28 | + int ret = -EINVAL, res; |
---|
42 | 29 | |
---|
43 | 30 | if (count == 0) |
---|
44 | 31 | goto out; |
---|
45 | 32 | count = min_t(size_t, count, 10); |
---|
46 | 33 | memcpy(tmp, buf, count); |
---|
47 | | - ret = simple_strtol(tmp, NULL, 10); |
---|
| 34 | + ret = kstrtoint(tmp, 10, &res); |
---|
| 35 | + if (!ret) |
---|
| 36 | + return res; |
---|
48 | 37 | out: |
---|
49 | 38 | return ret; |
---|
50 | 39 | } |
---|
.. | .. |
---|
143 | 132 | if (err) |
---|
144 | 133 | b43legacyerr(wldev->wl, "Interference Mitigation not " |
---|
145 | 134 | "supported by device\n"); |
---|
146 | | - mmiowb(); |
---|
147 | 135 | spin_unlock_irqrestore(&wldev->wl->irq_lock, flags); |
---|
148 | 136 | mutex_unlock(&wldev->wl->mutex); |
---|
149 | 137 | |
---|