staging: brcm80211: use native error code in brcmf_c_pattern_atoh()
authorArend van Spriel <arend@broadcom.com>
Mon, 8 Aug 2011 13:58:06 +0000 (15:58 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 19:59:56 +0000 (12:59 -0700)
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@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/brcm80211/brcmfmac/dhd_common.c

index 1e757b73b80797471b9ed7509f514eb7a35c6c58..44128934dc0e16cf3438d8881c4a32504aeb7460 100644 (file)
@@ -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];