[PATCH] scsi: mpt3sas: Fix missing unwind goto in mpt3sas_config_update_driver_trigger_pg3()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Smatch warns:
drivers/scsi/mpt3sas/mpt3sas_config.c:2478
mpt3sas_config_update_driver_trigger_pg3() warn: missing unwind goto?

Fix this by assigning '-EFAULT' to 'rc' and
changing the direct return to a goto 'out'.

Fixes: 2a5c3a35c156 ("scsi: mpt3sas: Add persistent SCSI sense trigger page")
Signed-off-by: Zhong Yong <U201911841@xxxxxxxxxxx>
Reviewed-by: Dongliang Mu <dzm91@xxxxxxxxxxx>
---
The issue is found by static analysis and the patch remains untested.
---
 drivers/scsi/mpt3sas/mpt3sas_config.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_config.c b/drivers/scsi/mpt3sas/mpt3sas_config.c
index d114ef381c44..a426d086044a 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_config.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_config.c
@@ -2475,7 +2475,8 @@ mpt3sas_config_update_driver_trigger_pg3(struct MPT3SAS_ADAPTER *ioc,
 		    ioc_err(ioc,
 		    "%s: Failed to get trigger pg3, ioc_status(0x%04x)\n",
 		    __func__, ioc_status));
-		return -EFAULT;
+		rc = -EFAULT;
+		goto out;
 	}
 
 	if (set) {
-- 
2.34.1




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux