diff options
author | Arend van Spriel <[email protected]> | 2011-06-29 16:46:28 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2011-07-05 09:57:09 -0700 |
commit | fa0ace7fd3b9cfbe3b2d117af7eac4a132558a1b (patch) | |
tree | f01f45bceef770b364676b6ab6bee751a9f5e521 | |
parent | fb10e59111870a51f0eb7bcc046b6b7eb39dfa3e (diff) |
staging: brcm80211: minor cleanup in initvars_srom_pci()
The error handling code labelled with errout: did a conditional kfree(). The
last error jump to the label is upon failure of the kmalloc() for which the
conditional kfree() is done. Therefor, the kfree is moved before the error
label and done unconditionally.
Signed-off-by: Arend van Spriel <[email protected]>
Reviewed-by: Roland Vossen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/staging/brcm80211/brcmsmac/srom.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/brcm80211/brcmsmac/srom.c b/drivers/staging/brcm80211/brcmsmac/srom.c index 5b5306a510fd..31aa84d4aff4 100644 --- a/drivers/staging/brcm80211/brcmsmac/srom.c +++ b/drivers/staging/brcm80211/brcmsmac/srom.c @@ -1287,12 +1287,10 @@ static int initvars_srom_pci(struct si_pub *sih, void *curmap, char **vars, *vp++ = '\0'; err = initvars_table(base, vp, vars, count); + kfree(base); } errout: - if (base) - kfree(base); - kfree(srom); return err; } |