Skip to content

Commit

Permalink
[SCSI] aacraid: Fix extra unregister_chrdev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Haverkamp authored and James Bottomley committed Apr 13, 2006
1 parent 95433ba commit 5392627
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 5392627

Please sign in to comment.