Skip to content

Commit e729452

Browse files
tititiou36davem330
authored andcommitted
cxgb4: Fix error handling path in 'init_one()'
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 <christophe.jaillet@wanadoo.fr> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4d80ecd commit e729452

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5166,7 +5166,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
51665166
adapter->regs = regs;
51675167
err = t4_wait_dev_ready(regs);
51685168
if (err < 0)
5169-
goto out_unmap_bar0;
5169+
goto out_free_adapter;
51705170

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

0 commit comments

Comments
 (0)