Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 286660
b: refs/heads/master
c: ca2b721
h: refs/heads/master
v: v3
  • Loading branch information
Roopa Prabhu authored and David S. Miller committed Jan 18, 2012
1 parent b9a38aa commit 8c158d5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7335903cba523fc2fd801a178a0e4fcf8ccae756
refs/heads/master: ca2b721de25b9893310fd695a38b495d14c70ff3
14 changes: 7 additions & 7 deletions trunk/drivers/net/ethernet/cisco/enic/enic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2270,10 +2270,10 @@ static int __devinit enic_probe(struct pci_dev *pdev,
int using_dac = 0;
unsigned int i;
int err;
int num_pps = 1;
#ifdef CONFIG_PCI_IOV
int pos = 0;
#endif
int num_pps;

/* Allocate net device structure and initialize. Private
* instance data is initialized to zero.
Expand Down Expand Up @@ -2380,17 +2380,17 @@ 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) {
pr_err("port profile alloc failed, aborting\n");
err = -ENOMEM;
goto err_out_disable_sriov;
goto err_out_disable_sriov_pp;
}

/* Issue device open to get device in known state
Expand All @@ -2399,7 +2399,7 @@ static int __devinit enic_probe(struct pci_dev *pdev,
err = enic_dev_open(enic);
if (err) {
dev_err(dev, "vNIC dev open failed, aborting\n");
goto err_out_free_pp;
goto err_out_disable_sriov;
}

/* Setup devcmd lock
Expand Down Expand Up @@ -2522,9 +2522,9 @@ static int __devinit enic_probe(struct pci_dev *pdev,
enic_dev_deinit(enic);
err_out_dev_close:
vnic_dev_close(enic->vdev);
err_out_free_pp:
kfree(enic->pp);
err_out_disable_sriov:
kfree(enic->pp);
err_out_disable_sriov_pp:
#ifdef CONFIG_PCI_IOV
if (enic_sriov_enabled(enic)) {
pci_disable_sriov(pdev);
Expand Down

0 comments on commit 8c158d5

Please sign in to comment.