2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-20 03:04:01 +08:00

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>
This commit is contained in:
Michael Chan 2015-12-27 18:19:22 -05:00 committed by David S. Miller
parent 665e350ddb
commit 45019a1803

View File

@ -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;