Skip to contentSkip to conversation

mptfc: initialize return value in mptfc_bus_reset()

PATCH Applied Hannes Reinecke 3 participants 4 messages Oct 23, 2023 – Oct 30, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mptfc: initialize return value in mptfc_bus_reset()

Detected by smatch.

Fixes 17865dc2eccc ("scsi: message: fusion: Open-code mptfc_block_error_handler() for bus reset")
---
 drivers/message/fusion/mptfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/message/fusion/mptfc.c +1 -1
index aa6bb764df3e..0581f855c72e 100644
@@ -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) {
Signature · 1 line
2.35.3