diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-06-23 18:17:38 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-06-28 21:18:08 +0300 |
commit | 69551f5f370cc20342fab17ca54716b6ec7e332d (patch) | |
tree | 966ab5b49d872596c83063756dead20c3bbcb94b /drivers/net/wireless/marvell | |
parent | 3ac27dd37b40ae9a1a2690c91f27ab339b275142 (diff) |
libertas: Fix lbs_prb_rsp_limit_set()
The kstrtoul() test was reversed so this always returned -ENOTSUPP.
Fixes: 27d7f47756f4 ("net: wireless: replace strict_strtoul() with kstrtoul()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: James Cameron <quozl@laptop.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell')
-rw-r--r-- | drivers/net/wireless/marvell/libertas/mesh.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/marvell/libertas/mesh.c b/drivers/net/wireless/marvell/libertas/mesh.c index eeeb892219aa..37ace5cb309d 100644 --- a/drivers/net/wireless/marvell/libertas/mesh.c +++ b/drivers/net/wireless/marvell/libertas/mesh.c @@ -233,8 +233,9 @@ static ssize_t lbs_prb_rsp_limit_set(struct device *dev, memset(&mesh_access, 0, sizeof(mesh_access)); mesh_access.data[0] = cpu_to_le32(CMD_ACT_SET); - if (!kstrtoul(buf, 10, &retry_limit)) - return -ENOTSUPP; + ret = kstrtoul(buf, 10, &retry_limit); + if (ret) + return ret; if (retry_limit > 15) return -ENOTSUPP; |