diff mbox series

scsi: mpt3sas: Fix incorrectly assigned error return and check

Message ID 20210804134940.114011-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show
Series scsi: mpt3sas: Fix incorrectly assigned error return and check | expand

Commit Message

Colin King Aug. 4, 2021, 1:49 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Currently the call to _base_static_config_pages is assigning the error
return to variable rc but checking the error return in error r. Fix this
by assigning the error return to variable r instread of rc.

Addresses-Coverity: ("Unused value")
Fixes: 19a622c39a9d ("scsi: mpt3sas: Handle firmware faults during first half of IOC init")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Martin K. Petersen Aug. 10, 2021, 5:16 a.m. UTC | #1
On Wed, 4 Aug 2021 14:49:40 +0100, Colin King wrote:

> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently the call to _base_static_config_pages is assigning the error
> return to variable rc but checking the error return in error r. Fix this
> by assigning the error return to variable r instread of rc.
> 
> 
> [...]

Applied to 5.14/scsi-fixes, thanks!

[1/1] scsi: mpt3sas: Fix incorrectly assigned error return and check
      https://git.kernel.org/mkp/scsi/c/40d32727931c
diff mbox series

Patch

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 19b1c0cf5f2a..cf4a3a2c22ad 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -7851,7 +7851,7 @@  _base_make_ioc_operational(struct MPT3SAS_ADAPTER *ioc)
 			return r;
 	}
 
-	rc = _base_static_config_pages(ioc);
+	r = _base_static_config_pages(ioc);
 	if (r)
 		return r;