diff options
author | Mark Haverkamp <markh@osdl.org> | 2006-03-27 12:44:19 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-04-13 11:13:19 -0400 |
commit | 53926274f24e5c852dbe8f89dea16b7822549472 (patch) | |
tree | d468b352dfc8f148a8303e7a0206b8d48df640f8 /drivers/scsi/aacraid/linit.c | |
parent | 95433badf0ff8dbc2caf14bc69c984841539715f (diff) |
[SCSI] aacraid: Fix extra unregister_chrdev
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>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index fbd4f5538ac1..9437a4c8b64a 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -1023,7 +1023,8 @@ static int __init aac_init(void) | |||
1023 | 1023 | ||
1024 | static void __exit aac_exit(void) | 1024 | static void __exit aac_exit(void) |
1025 | { | 1025 | { |
1026 | unregister_chrdev(aac_cfg_major, "aac"); | 1026 | if (aac_cfg_major > -1) |
1027 | unregister_chrdev(aac_cfg_major, "aac"); | ||
1027 | pci_unregister_driver(&aac_pci_driver); | 1028 | pci_unregister_driver(&aac_pci_driver); |
1028 | } | 1029 | } |
1029 | 1030 | ||