Skip to content

Commit

Permalink
tg3: Clean tg3_init_one()
Browse files Browse the repository at this point in the history
Tg3's firmware is no longer loaded from tg3_init_one().  Remove the
error path that releases the firmware back to the system.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Matt Carlson authored and David S. Miller committed Dec 3, 2009
1 parent 94c982b commit 026a6c2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -14482,7 +14482,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
if (err) {
printk(KERN_ERR PFX "Could not obtain valid ethernet address, "
"aborting.\n");
goto err_out_fw;
goto err_out_iounmap;
}

if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) {
Expand All @@ -14491,7 +14491,7 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
printk(KERN_ERR PFX "Cannot map APE registers, "
"aborting.\n");
err = -ENOMEM;
goto err_out_fw;
goto err_out_iounmap;
}

tg3_ape_lock_init(tp);
Expand Down Expand Up @@ -14622,10 +14622,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
tp->aperegs = NULL;
}

err_out_fw:
if (tp->fw)
release_firmware(tp->fw);

err_out_iounmap:
if (tp->regs) {
iounmap(tp->regs);
Expand Down

0 comments on commit 026a6c2

Please sign in to comment.