summaryrefslogtreecommitdiffstats
path: root/drivers/message
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2023-10-23 09:30:05 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2023-10-24 22:36:39 -0400
commit4b1c07913239b7a02592084d449c3938ce22b106 (patch)
tree05f4e518240b88763866f0ae839b9bd8fdc16c13 /drivers/message
parent3c978492c333f0c08248a8d51cecbe5eb5f617c9 (diff)
downloadlinux-stable-4b1c07913239b7a02592084d449c3938ce22b106.tar.gz
linux-stable-4b1c07913239b7a02592084d449c3938ce22b106.tar.bz2
linux-stable-4b1c07913239b7a02592084d449c3938ce22b106.zip
scsi: message: fusion: Initialize return value in mptfc_bus_reset()
Detected by smatch. Fixes: 17865dc2eccc ("scsi: message: fusion: Open-code mptfc_block_error_handler() for bus reset") Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by: Hannes Reinecke <hare@suse.de> Link: https://lore.kernel.org/r/20231023073005.20766-1-hare@suse.de Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/message')
-rw-r--r--drivers/message/fusion/mptfc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/message/fusion/mptfc.c b/drivers/message/fusion/mptfc.c
index aa6bb764df3e..0581f855c72e 100644
--- a/drivers/message/fusion/mptfc.c
+++ b/drivers/message/fusion/mptfc.c
@@ -265,7 +265,7 @@ mptfc_bus_reset(struct scsi_cmnd *SCpnt)
MPT_SCSI_HOST __maybe_unused *hd = shost_priv(shost);
int channel = SCpnt->device->channel;
struct mptfc_rport_info *ri;
- int rtn;
+ int rtn = FAILED;
list_for_each_entry(ri, &hd->ioc->fc_rports, list) {
if (ri->flags & MPT_RPORT_INFO_FLAGS_REGISTERED) {