From: Michal Schmidt Date: Fri, 4 Dec 2015 16:22:34 +0000 (+0100) Subject: bnx2x: drop redundant error message about allocation failure X-Git-Tag: v4.1.12-92~119^2~27 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6cdd1e3e9ea272af8fa72610cbd65c7c863cd145;p=users%2Fjedix%2Flinux-maple.git bnx2x: drop redundant error message about allocation failure alloc_pages() already prints a warning when it fails. No need to emit another message. Certainly not at KERN_ERR level, because it is no big deal if this GFP_ATOMIC allocation fails occasionally. Signed-off-by: Michal Schmidt Signed-off-by: David S. Miller Orabug: 23718192 Signed-off-by: Manjunath Govindashetty --- diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c index 80d23226d9e41..37118439a36d8 100644 --- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c @@ -560,10 +560,8 @@ static int bnx2x_alloc_rx_sge(struct bnx2x *bp, struct bnx2x_fastpath *fp, put_page(pool->page); pool->page = alloc_pages(gfp_mask, PAGES_PER_SGE_SHIFT); - if (unlikely(!pool->page)) { - BNX2X_ERR("Can't alloc sge\n"); + if (unlikely(!pool->page)) return -ENOMEM; - } pool->offset = 0; }