提交 53926274 编写于 作者: M Mark Haverkamp 提交者: James Bottomley

[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: NMark Haverkamp <markh@osdl.org>
Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
上级 95433bad
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册