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