1
0
Fork 0

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

[ Upstream commit 0756c57bce ]

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

Fixes: 2908d778ab ("[SCSI] aic94xx: new driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pull/10/head
Dan Carpenter 2018-08-08 17:29:09 +03:00 committed by Greg Kroah-Hartman
parent 24165131bc
commit 8ac6b14753
1 changed files with 3 additions and 1 deletions

View File

@ -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)