diff options
author | Michael Chan <mchan@broadcom.com> | 2015-12-27 18:19:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-12-28 00:57:28 -0500 |
commit | 45019a180358c3cf290c3f3dc953c44f978d5527 (patch) | |
tree | 6fe75b32b4175467b2472330aed1ce492d47bb32 /drivers | |
parent | 665e350ddbfde88c5c18142dfd7b8c64556bc964 (diff) | |
download | linux-45019a180358c3cf290c3f3dc953c44f978d5527.tar.bz2 |
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 <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; |