mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 20:51:27 +00:00
qla2xxx: Unregister resources in the opposite order of the registration order
Make sure that resources are only unregistered after the users of these resources have been unregistered. Only unregister the character device if registration of it succeeded. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8236 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -7540,14 +7540,15 @@ destroy_cache:
|
||||
static void __exit
|
||||
qla2x00_module_exit(void)
|
||||
{
|
||||
unregister_chrdev(apidev_major, QLA2XXX_APIDEV);
|
||||
pci_unregister_driver(&qla2xxx_pci_driver);
|
||||
qla2x00_release_firmware();
|
||||
kmem_cache_destroy(srb_cachep);
|
||||
qlt_exit();
|
||||
kmem_cache_destroy(ctx_cachep);
|
||||
fc_release_transport(qla2xxx_transport_template);
|
||||
fc_release_transport(qla2xxx_transport_vport_template);
|
||||
if (apidev_major >= 0)
|
||||
unregister_chrdev(apidev_major, QLA2XXX_APIDEV);
|
||||
fc_release_transport(qla2xxx_transport_template);
|
||||
qlt_exit();
|
||||
kmem_cache_destroy(srb_cachep);
|
||||
}
|
||||
|
||||
module_init(qla2x00_module_init);
|
||||
|
||||
Reference in New Issue
Block a user