Commit fecee54b authored by Dan Carpenter's avatar Dan Carpenter Committed by Kleber Sacilotto de Souza

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

BugLink: https://bugs.launchpad.net/bugs/1797563

[ Upstream commit 0756c57b ]

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

Fixes: 2908d778 ("[SCSI] aic94xx: new driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent 822f55b6
......@@ -1031,8 +1031,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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment