scsi: isci: Return result of sas_register_ha()
authorArtem Chernyshev <artem.chernyshev@red-soft.ru>
Sun, 13 Aug 2023 20:23:36 +0000 (23:23 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 21 Aug 2023 20:39:30 +0000 (16:39 -0400)
To properly manage possible failure of sas_register_ha() in
isci_register_sas_ha(), return its result instead of zero

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
Link: https://lore.kernel.org/r/20230813202336.240874-1-artem.chernyshev@red-soft.ru
Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/isci/init.c

index ac1e04b86d8fed3426fa6eb3b7c878b7d7136152..4f4800edf4f066b76675d7e109b4f9eda4e8c00f 100644 (file)
@@ -264,9 +264,7 @@ static int isci_register_sas_ha(struct isci_host *isci_host)
 
        sas_ha->strict_wide_ports = 1;
 
-       sas_register_ha(sas_ha);
-
-       return 0;
+       return sas_register_ha(sas_ha);
 }
 
 static void isci_unregister(struct isci_host *isci_host)