diff mbox series

mptfc: initialize return value in mptfc_bus_reset()

Message ID 20231023073005.20766-1-hare@suse.de
State New
Headers show
Series mptfc: initialize return value in mptfc_bus_reset() | expand

Commit Message

Hannes Reinecke Oct. 23, 2023, 7:30 a.m. UTC
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(-)

Comments

Christoph Hellwig Oct. 24, 2023, 6:24 a.m. UTC | #1
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Martin K. Petersen Oct. 30, 2023, 3:34 p.m. UTC | #2
On Mon, 23 Oct 2023 09:30:05 +0200, Hannes Reinecke wrote:

> Detected by smatch.
> 
> 

Applied to 6.7/scsi-queue, thanks!

[1/1] mptfc: initialize return value in mptfc_bus_reset()
      https://git.kernel.org/mkp/scsi/c/4b1c07913239
diff mbox series

Patch

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