From 45019a180358c3cf290c3f3dc953c44f978d5527 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Sun, 27 Dec 2015 18:19:22 -0500 Subject: bnxt_en: Allocate rx_cpu_rmap only if Accelerated RFS is enabled. Also, no need to check for bp->rx_nr_rings as it is always >= 1. If the allocation fails, it is not a fatal error and we can still proceed. Signed-off-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 3ce3bd337bb3..06ce100f3c54 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -4009,10 +4009,8 @@ static int bnxt_set_real_num_queues(struct bnxt *bp) return rc; #ifdef CONFIG_RFS_ACCEL - if (bp->rx_nr_rings) + if (bp->flags & BNXT_FLAG_RFS) dev->rx_cpu_rmap = alloc_irq_cpu_rmap(bp->rx_nr_rings); - if (!dev->rx_cpu_rmap) - rc = -ENOMEM; #endif return rc; -- cgit v1.2.3