提交 2c1599cf 编写于 作者: R Roland Vossen 提交者: Greg Kroah-Hartman

staging: brcm80211: bugfix for len==0 parameter in 3 fullmac functions

Three functions use the same method to check incoming parameters. The
'len' parameter can be equal to 0 in case of a 'set' operation.
Currently these functions return an error code under that condition,
which is incorrect. The problem was introduced in recent patches in
which asserts were removed from the fullmac.

Despite this being a bug, my regression testing has not shown any problems.
Reported-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NRoland Vossen <rvossen@broadcom.com>
Reviewed-by: NArend van Spriel <arend@broadcom.com>
Reviewed-by: NFranky Lin <frankyl@broadcom.com>
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a9f81a93
......@@ -407,7 +407,7 @@ brcmf_sdioh_iovar_op(struct sdioh_info *si, const char *name,
bool bool_val;
u32 actionid;
if (name == NULL || len <= 0)
if (name == NULL || len < 0)
return -EINVAL;
/* Set does not take qualifiers */
......
......@@ -311,7 +311,7 @@ brcmf_c_iovar_op(struct brcmf_pub *drvr, const char *name,
BRCMF_TRACE(("%s: Enter\n", __func__));
if (name == NULL || len <= 0)
if (name == NULL || len < 0)
return -EINVAL;
/* Set does not take qualifiers */
......
......@@ -3123,7 +3123,7 @@ brcmf_sdbrcm_bus_iovar_op(struct brcmf_pub *drvr, const char *name,
BRCMF_TRACE(("%s: Enter\n", __func__));
if (name == NULL || len <= 0)
if (name == NULL || len < 0)
return -EINVAL;
/* Set does not take qualifiers */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册