Skip to content

Commit

Permalink
cxgb4: Fix error handling path in 'init_one()'
Browse files Browse the repository at this point in the history
Commit baf5086 ("cxgb4: restructure VF mgmt code") has reordered
some code but an error handling label has not been updated accordingly.
So fix it and free 'adapter' if 't4_wait_dev_ready()' fails.

Fixes: baf5086 ("cxgb4: restructure VF mgmt code")
Signed-off-by: Christophe JAILLET <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tititiou36 authored and davem330 committed Feb 8, 2018
1 parent 4d80ecd commit e729452
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5166,7 +5166,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
adapter->regs = regs;
err = t4_wait_dev_ready(regs);
if (err < 0)
goto out_unmap_bar0;
goto out_free_adapter;

/* We control everything through one PF */
whoami = readl(regs + PL_WHOAMI_A);
Expand Down

0 comments on commit e729452

Please sign in to comment.