From e10d82d47dc4fe1d98ab46337324a2f7facc0491 Mon Sep 17 00:00:00 2001 From: Roland Vossen Date: Tue, 3 May 2011 11:35:19 +0200 Subject: staging: brcm80211: replace error codes part 1 Replacing part of the proprietary error code values with native error code values. Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley Cc: Henry Ptasinski Cc: Roland Vossen Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- drivers/staging/brcm80211/util/bcmsrom.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/staging/brcm80211/util/bcmsrom.c') diff --git a/drivers/staging/brcm80211/util/bcmsrom.c b/drivers/staging/brcm80211/util/bcmsrom.c index 6b5a13d..d61753d 100644 --- a/drivers/staging/brcm80211/util/bcmsrom.c +++ b/drivers/staging/brcm80211/util/bcmsrom.c @@ -324,7 +324,7 @@ static int initvars_table(char *start, char *end, char *vp = kmalloc(c, GFP_ATOMIC); ASSERT(vp != NULL); if (!vp) - return -BCME_NOMEM; + return -ENOMEM; memcpy(vp, start, c); *vars = vp; *count = c; @@ -353,7 +353,7 @@ static int initvars_flash(si_t *sih, char **base, uint len) /* allocate memory and read in flash */ flash = kmalloc(NVRAM_SPACE, GFP_ATOMIC); if (!flash) - return -BCME_NOMEM; + return -ENOMEM; err = nvram_getall(flash, NVRAM_SPACE); if (err) goto exit; @@ -372,7 +372,7 @@ static int initvars_flash(si_t *sih, char **base, uint len) /* is there enough room to copy? */ copy_len = l - dl + 1; if (len < copy_len) { - err = -BCME_BUFTOOSHORT; + err = -EOVERFLOW; goto exit; } @@ -384,7 +384,7 @@ static int initvars_flash(si_t *sih, char **base, uint len) /* add null string as terminator */ if (len < 1) { - err = -BCME_BUFTOOSHORT; + err = -EOVERFLOW; goto exit; } *vp++ = '\0'; @@ -410,7 +410,7 @@ static int initvars_flash_si(si_t *sih, char **vars, uint *count) base = vp = kmalloc(MAXSZ_NVRAM_VARS, GFP_ATOMIC); ASSERT(vp != NULL); if (!vp) - return -BCME_NOMEM; + return -ENOMEM; err = initvars_flash(sih, &vp, MAXSZ_NVRAM_VARS); if (err == 0) -- cgit v1.1