提交 0756c57b 编写于 作者: D Dan Carpenter 提交者: Martin K. Petersen

scsi: aic94xx: fix an error code in aic94xx_init()

We accidentally return success instead of -ENOMEM on this error path.

Fixes: 2908d778 ("[SCSI] aic94xx: new driver")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: NJohn Garry <john.garry@huawei.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 99052817
......@@ -1030,8 +1030,10 @@ static int __init aic94xx_init(void)
aic94xx_transport_template =
sas_domain_attach_transport(&aic94xx_transport_functions);
if (!aic94xx_transport_template)
if (!aic94xx_transport_template) {
err = -ENOMEM;
goto out_destroy_caches;
}
err = pci_register_driver(&aic94xx_pci_driver);
if (err)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册