mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging: dgap: fix error path
The code in dgap_stop() is almost a duplicate of the code that will be executed on pci_unregister_driver(). So the error code was stopping and unregistering everything twice. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7d708e52c2
commit
ac4e504a59
@ -7133,8 +7133,10 @@ static int dgap_init_module(void)
|
|||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
rc = pci_register_driver(&dgap_driver);
|
rc = pci_register_driver(&dgap_driver);
|
||||||
if (rc)
|
if (rc) {
|
||||||
goto err_stop;
|
dgap_stop();
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
rc = dgap_create_driver_sysfiles(&dgap_driver);
|
rc = dgap_create_driver_sysfiles(&dgap_driver);
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -7146,9 +7148,6 @@ static int dgap_init_module(void)
|
|||||||
|
|
||||||
err_unregister:
|
err_unregister:
|
||||||
pci_unregister_driver(&dgap_driver);
|
pci_unregister_driver(&dgap_driver);
|
||||||
err_stop:
|
|
||||||
dgap_stop();
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user