Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69551f5f authored by Dan Carpenter's avatar Dan Carpenter Committed by Kalle Valo
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJames Cameron <quozl@laptop.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 3ac27dd3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;