Commit a3c4c580 authored by Li Hong's avatar Li Hong Committed by Borislav Petkov

amd64_edac: fix a wrong goto clause in amd64_edac.c

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: default avatarLi Hong <lihong.hi@gmail.com>
Acked-by: default avatarDoug Thompson <dougthompson@xmission.com>
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent b419148e
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment