public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mptfc: initialize return value in mptfc_bus_reset()
@ 2023-10-23  7:30 Hannes Reinecke
  2023-10-24  6:24 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hannes Reinecke @ 2023-10-23  7:30 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke,
	Dan Carpenter

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>
---
 drivers/message/fusion/mptfc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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) {
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-30 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-23  7:30 [PATCH] mptfc: initialize return value in mptfc_bus_reset() Hannes Reinecke
2023-10-24  6:24 ` Christoph Hellwig
2023-10-25  2:36 ` Martin K. Petersen
2023-10-30 15:34 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox