diff mbox series

scsi: isci: init Return result of sas_register_ha()

Message ID 20230813202336.240874-1-artem.chernyshev@red-soft.ru
State New
Headers show
Series scsi: isci: init Return result of sas_register_ha() | expand

Commit Message

Artem Chernyshev Aug. 13, 2023, 8:23 p.m. UTC
To properly manage possible failure of sas_register_ha() in
isci_register_sas_ha() return it's result instead of zero

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

Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru>
---
 drivers/scsi/isci/init.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Martin K. Petersen Aug. 21, 2023, 8:39 p.m. UTC | #1
Artem,

> To properly manage possible failure of sas_register_ha() in
> isci_register_sas_ha() return it's result instead of zero

Applied to 6.6/scsi-staging, thanks!
Martin K. Petersen Aug. 25, 2023, 1:12 a.m. UTC | #2
On Sun, 13 Aug 2023 23:23:36 +0300, Artem Chernyshev wrote:

> To properly manage possible failure of sas_register_ha() in
> isci_register_sas_ha() return it's result instead of zero
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> 

Applied to 6.6/scsi-queue, thanks!

[1/1] scsi: isci: init Return result of sas_register_ha()
      https://git.kernel.org/mkp/scsi/c/9a23ed57abbb
diff mbox series

Patch

diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c
index ac1e04b86d8f..4f4800edf4f0 100644
--- a/drivers/scsi/isci/init.c
+++ b/drivers/scsi/isci/init.c
@@ -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)