Skip to content

Commit

Permalink
amd64_edac: fix a wrong goto clause in amd64_edac.c
Browse files Browse the repository at this point in the history
In amd64_edac_init(void) in amd64_edac.c, cache_k8_northbridges() is
called before pci_register_driver. If it fails, should exit with err
directly.

Signed-off-by: Li Hong <lihong.hi@gmail.com>
Acked-by: Doug Thompson <dougthompson@xmission.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
  • Loading branch information
Li Hong authored and Borislav Petkov committed Nov 4, 2009
1 parent b419148 commit a3c4c58
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3163,7 +3163,7 @@ static int __init amd64_edac_init(void)
opstate_init();

if (cache_k8_northbridges() < 0)
goto err_exit;
return err;

err = pci_register_driver(&amd64_pci_driver);
if (err)
Expand All @@ -3189,8 +3189,6 @@ static int __init amd64_edac_init(void)

err_2nd_stage:
debugf0("2nd stage failed\n");

err_exit:
pci_unregister_driver(&amd64_pci_driver);

return err;
Expand Down

0 comments on commit a3c4c58

Please sign in to comment.