Search Linux Wireless

[PATCHv2 22/82] staging: brcm80211: use native error code in brcmf_c_pattern_atoh()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The function brcmf_c_pattern_atoh() returned meaningless -1 value.
These have been replaced by linux error code -EINVAL.

Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
Reviewed-by: Roland Vossen <rvossen@xxxxxxxxxxxx>
Reviewed-by: Franky Lin <frankyl@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/brcmfmac/dhd_common.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_common.c b/drivers/staging/brcm80211/brcmfmac/dhd_common.c
index 1e757b7..4412893 100644
--- a/drivers/staging/brcm80211/brcmfmac/dhd_common.c
+++ b/drivers/staging/brcm80211/brcmfmac/dhd_common.c
@@ -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];
-- 
1.7.4.1


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux