提交 69551f5f 编写于 作者: D Dan Carpenter 提交者: Kalle Valo

libertas: Fix lbs_prb_rsp_limit_set()

The kstrtoul() test was reversed so this always returned -ENOTSUPP.

Fixes: 27d7f477 ("net: wireless: replace strict_strtoul() with kstrtoul()")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NJames Cameron <quozl@laptop.org>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 3ac27dd3
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册