From a652bf0381ae003d37628dac6dc5e4593ca535b7 Mon Sep 17 00:00:00 2001 From: Arend van Spriel Date: Wed, 17 Apr 2013 21:25:51 +0200 Subject: [PATCH] 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 --- drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; -- 2.39.5