cxgb4: Don't allocate adapter structure for all PF's
authorHariprasad Shenai <hariprasad@chelsio.com>
Mon, 15 Sep 2014 21:28:46 +0000 (02:58 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Sep 2014 21:42:59 +0000 (17:42 -0400)
commitd6ce2628f32271c037a8c12e1994c9fba3a4af49
tree6fefde03139b1df259601148ab31525e0130992b
parentc095f248e63ada504dd90c90baae673ae10ee3fe
cxgb4: Don't allocate adapter structure for all PF's

commit 35b1de557970 ("rdma/cxgb4: Fixes cxgb4 probe failure in VM when PF is
exposed through PCI Passthrough") moved the code to check for SR-IOV PF[0..3]
much further down in init_one() past the point where we allocate a (struct
adapter) for PF[0..3]. As a result, we left four of these on ever module remove.

Fix: Allocate adapter structure only for PF4

Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c