diff options
author | root <root@iss-tomyspiel-1> | 2011-10-18 21:48:54 +0200 |
---|---|---|
committer | root <root@iss-tomyspiel-1> | 2011-10-18 21:48:54 +0200 |
commit | 9ad96da69350712cbba71e946660ede49017b507 (patch) | |
tree | c59b7d6f16b248b61aa48aed8143050f579518ee | |
parent | 6880d3f07317d34af6f30515acea128bb19f84a3 (diff) | |
download | ipecamera-9ad96da69350712cbba71e946660ede49017b507.tar.gz ipecamera-9ad96da69350712cbba71e946660ede49017b507.tar.bz2 ipecamera-9ad96da69350712cbba71e946660ede49017b507.tar.xz ipecamera-9ad96da69350712cbba71e946660ede49017b507.zip |
Fix crash on the driver unload
-rw-r--r-- | driver/base.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/driver/base.c b/driver/base.c index 2b998e3..51dd1f4 100644 --- a/driver/base.c +++ b/driver/base.c @@ -259,11 +259,12 @@ init_alloc_fail: */ static void pcidriver_exit(void) { + pci_unregister_driver(&pcidriver_driver); + unregister_chrdev_region(pcidriver_devt, MAXDEVICES); + if (pcidriver_class != NULL) class_destroy(pcidriver_class); - pci_unregister_driver(&pcidriver_driver); - unregister_chrdev_region(pcidriver_devt, MAXDEVICES); mod_info("Module unloaded\n"); } |