]> err.no Git - linux-2.6/commitdiff
[SCSI] aacraid: Fix extra unregister_chrdev
authorMark Haverkamp <markh@osdl.org>
Mon, 27 Mar 2006 17:44:19 +0000 (09:44 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Thu, 13 Apr 2006 15:13:19 +0000 (10:13 -0500)
Received from Mark Salyzyn

If there are no aacraid controllers, we do not create the raid
controller chrdev, thus when the driver is unloaded it performs a
superfluous deregistration.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/aacraid/linit.c

index fbd4f5538ac1b9b2cc51d7037226af48717835a8..9437a4c8b64a2a2cfc330d75fc70777f1c8f3a12 100644 (file)
@@ -1023,7 +1023,8 @@ static int __init aac_init(void)
 
 static void __exit aac_exit(void)
 {
-       unregister_chrdev(aac_cfg_major, "aac");
+       if (aac_cfg_major > -1)
+               unregister_chrdev(aac_cfg_major, "aac");
        pci_unregister_driver(&aac_pci_driver);
 }