aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/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,
2273#ifdef CONFIG_PCI_IOV 2273#ifdef CONFIG_PCI_IOV
2274 int pos = 0; 2274 int pos = 0;
2275#endif 2275#endif
2276 int num_pps; 2276 int num_pps = 1;
2277 2277
2278 /* Allocate net device structure and initialize. Private 2278 /* Allocate net device structure and initialize. Private
2279 * instance data is initialized to zero. 2279 * instance data is initialized to zero.
@@ -2380,11 +2380,11 @@ static int __devinit enic_probe(struct pci_dev *pdev,
2380 goto err_out_vnic_unregister; 2380 goto err_out_vnic_unregister;
2381 } 2381 }
2382 enic->priv_flags |= ENIC_SRIOV_ENABLED; 2382 enic->priv_flags |= ENIC_SRIOV_ENABLED;
2383 num_pps = enic->num_vfs;
2383 } 2384 }
2384 } 2385 }
2385#endif 2386#endif
2386 2387
2387 num_pps = enic->num_vfs ? enic->num_vfs : 1;
2388 /* Allocate structure for port profiles */ 2388 /* Allocate structure for port profiles */
2389 enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL); 2389 enic->pp = kcalloc(num_pps, sizeof(*enic->pp), GFP_KERNEL);
2390 if (!enic->pp) { 2390 if (!enic->pp) {