diff options
author | Roland Vossen <rvossen@broadcom.com> | 2011-09-22 17:07:53 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 16:55:35 -0700 |
commit | 3428fc49229231eb8ac6940fc1ad30c572e1c96e (patch) | |
tree | 4f6418ff5c0aec5c6ecc18814426bcbcaba3746f /drivers/staging/brcm80211/brcmfmac/dhd_linux.c | |
parent | bb7410b2fd325d889f674d2456ce953c519fb774 (diff) | |
download | op-kernel-dev-3428fc49229231eb8ac6940fc1ad30c572e1c96e.zip op-kernel-dev-3428fc49229231eb8ac6940fc1ad30c572e1c96e.tar.gz |
staging: brcm80211: removed log after kzalloc()/kmalloc() failure
kzalloc/kmalloc already reports an allocation failure themselves.
Reported-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/brcmfmac/dhd_linux.c')
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/dhd_linux.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index cc8564a..659a9c2 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c @@ -159,11 +159,8 @@ static void _brcmf_set_multicast_list(struct work_struct *work) buflen = sizeof("mcast_list") + sizeof(cnt) + (cnt * ETH_ALEN); bufp = buf = kmalloc(buflen, GFP_ATOMIC); - if (!bufp) { - brcmf_dbg(ERROR, "%s: out of memory for mcast_list, cnt %d\n", - brcmf_ifname(&drvr_priv->pub, 0), cnt); + if (!bufp) return; - } strcpy(bufp, "mcast_list"); bufp += strlen("mcast_list") + 1; @@ -202,11 +199,9 @@ static void _brcmf_set_multicast_list(struct work_struct *work) buflen = sizeof("allmulti") + sizeof(allmulti); buf = kmalloc(buflen, GFP_ATOMIC); - if (!buf) { - brcmf_dbg(ERROR, "%s: out of memory for allmulti\n", - brcmf_ifname(&drvr_priv->pub, 0)); + if (!buf) return; - } + allmulti_le = cpu_to_le32(allmulti); if (!brcmu_mkiovar @@ -963,10 +958,8 @@ brcmf_add_if(struct brcmf_info *drvr_priv, int ifidx, struct net_device *net, ifp = drvr_priv->iflist[ifidx]; if (!ifp) { ifp = kmalloc(sizeof(struct brcmf_if), GFP_ATOMIC); - if (!ifp) { - brcmf_dbg(ERROR, "OOM - struct brcmf_if\n"); + if (!ifp) return -ENOMEM; - } } memset(ifp, 0, sizeof(struct brcmf_if)); @@ -1019,10 +1012,8 @@ struct brcmf_pub *brcmf_attach(struct brcmf_bus *bus, uint bus_hdrlen) /* Allocate primary brcmf_info */ drvr_priv = kzalloc(sizeof(struct brcmf_info), GFP_ATOMIC); - if (!drvr_priv) { - brcmf_dbg(ERROR, "OOM - alloc brcmf_info\n"); + if (!drvr_priv) goto fail; - } /* * Save the brcmf_info into the priv |