summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoopa Prabhu <roprabhu@cisco.com>2012-01-19 22:25:36 +0000
committerDavid S. Miller <davem@davemloft.net>2012-01-20 13:39:20 -0500
commitb67f231ded332461dd31123c4f659c4681223fb1 (patch)
tree34bc60fa12eaab6cf8efaa59957b8c8774334c45
parent3d8fe98f8d5cb303d907d8f94ea6dc1f9a1d8b7a (diff)
enic: fix compile when CONFIG_PCI_IOV is not enabled
reverting back change that access enic->num_vfs outside CONFIG_PCI_IOV Reported-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Roopa Prabhu <roprabhu@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisco/enic/enic_main.c
index 045c468ac8ef..ab3f67f980d8 100644
--- a/drivers/net/ethernet/cisco/enic/enic_main.c
+++ b/drivers/net/ethernet/cisco/enic/enic_main.c
@@ -2273,7 +2273,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
#ifdef CONFIG_PCI_IOV
int pos = 0;
#endif
- int num_pps;
+ int num_pps = 1;
/* Allocate net device structure and initialize. Private
* instance data is initialized to zero.
@@ -2380,11 +2380,11 @@ static int __devinit enic_probe(struct pci_dev *pdev,
goto err_out_vnic_unregister;
}
enic->priv_flags |= ENIC_SRIOV_ENABLED;
+ num_pps = enic->num_vfs;
}
}
#endif
- num_pps = enic->num_vfs ? enic->num_vfs : 1;
/* Allocate structure for port profiles */
enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL);
if (!enic->pp) {