提交 fee32378 编写于 作者: A Arend van Spriel 提交者: Greg Kroah-Hartman

staging: brcm80211: use native error code in brcmf_c_pattern_atoh()

The function brcmf_c_pattern_atoh() returned meaningless -1 value.
These have been replaced by linux error code -EINVAL.
Signed-off-by: NArend van Spriel <arend@broadcom.com>
Reviewed-by: NRoland Vossen <rvossen@broadcom.com>
Reviewed-by: NFranky Lin <frankyl@broadcom.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 a918137a
......@@ -841,12 +841,12 @@ static int brcmf_c_pattern_atoh(char *src, char *dst)
int i;
if (strncmp(src, "0x", 2) != 0 && strncmp(src, "0X", 2) != 0) {
BRCMF_ERROR(("Mask invalid format. Needs to start with 0x\n"));
return -1;
return -EINVAL;
}
src = src + 2; /* Skip past 0x */
if (strlen(src) % 2 != 0) {
BRCMF_ERROR(("Mask invalid format. Length must be even.\n"));
return -1;
return -EINVAL;
}
for (i = 0; *src != '\0'; i++) {
char num[3];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册