VirtualBox

Changeset 11174 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Aug 6, 2008 9:12:02 AM (16 years ago)
Author:
vboxsync
Message:

Linux guest additions: vboxadd: properly unregister the misc device

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/linux/module/vboxmod.c

    r10563 r11174  
    10691069                vboxDev->vmmdevmem, vboxDev->vmmdevmem_size,
    10701070                vboxDev->hypervisorStart, vboxDev->hypervisorSize));
    1071     Log(("Successfully loaded VirtualBox device version "
    1072            VBOX_VERSION_STRING " (interface " xstr(VMMDEV_VERSION) ")\n"));
     1071    printk(KERN_DEBUG "vboxadd: Successfully loaded version "
     1072            VBOX_VERSION_STRING " (interface " xstr(VMMDEV_VERSION) ")\n");
    10731073
    10741074    /* successful return */
     
    10791079    PCI_DEV_PUT(pcidev);
    10801080    free_resources();
    1081     unregister_chrdev(vbox_major, "vboxadd");
     1081    if (vbox_major > 0)
     1082        unregister_chrdev(vbox_major, "vboxadd");
     1083    else
     1084        misc_deregister(&gMiscDevice);
    10821085    return err;
    10831086}
     
    10891092static __exit void fini(void)
    10901093{
    1091     unregister_chrdev(vbox_major, "vboxadd");
     1094    if (vbox_major > 0)
     1095        unregister_chrdev(vbox_major, "vboxadd");
     1096    else
     1097        misc_deregister(&gMiscDevice);
    10921098    free_resources();
    10931099    vboxadd_cmc_fini ();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette