amd64_edac: fix a wrong goto clause in amd64_edac.c
authorLi Hong <lihong.hi@gmail.com>
Mon, 19 Oct 2009 08:33:29 +0000 (16:33 +0800)
committerBorislav Petkov <borislav.petkov@amd.com>
Wed, 4 Nov 2009 13:02:32 +0000 (14:02 +0100)
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>
drivers/edac/amd64_edac.c

index d4560d9d5a83519f0fa886109f7eee750fa71be5..3ee539a3fbb4d6743e85998fb463fc263ed7c528 100644 (file)
@@ -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)
@@ -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;