From: Arend van Spriel Date: Wed, 17 Apr 2013 19:25:51 +0000 (+0200) Subject: brcmfmac: remove error message upon allocation failure X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a652bf0381ae003d37628dac6dc5e4593ca535b7;p=linux-beck.git brcmfmac: remove error message upon allocation failure In function brcmf_add_if() an error message is printed upon alloc_netdev() failure. The allocation failure itself spews enough info in the log so remove the error message. Reviewed-by: Hante Meuleman Reviewed-by: Piotr Haber Signed-off-by: Arend van Spriel Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c index 269fde2a8168..a0afef26ac13 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c @@ -760,10 +760,8 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bssidx, s32 ifidx, brcmf_dbg(INFO, "allocate netdev interface\n"); /* Allocate netdev, including space for private structure */ ndev = alloc_netdev(sizeof(*ifp), name, ether_setup); - if (!ndev) { - brcmf_err("OOM - alloc_netdev\n"); + if (!ndev) return ERR_PTR(-ENOMEM); - } ifp = netdev_priv(ndev); ifp->ndev = ndev;