public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: gvp11: Fix error path after scsi_host_alloc
@ 2025-03-18 13:05 Miaoqian Lin
  0 siblings, 0 replies; only message in thread
From: Miaoqian Lin @ 2025-03-18 13:05 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, Hyunchul Lee,
	Sergey Senozhatsky, Ronnie Sahlberg, Namjae Jeon, Steve French,
	linux-scsi, linux-kernel
  Cc: linmq006

Fix error path after scsi_host_alloc() by using fail_irq label instead of
fail_check_or_alloc when dma_set_mask_and_coherent() fails. This ensures
proper cleanup of allocated resources by calling scsi_host_put().

Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
 drivers/scsi/gvp11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index 0420bfe9bd42..272ea2d1c8fd 100644
--- a/drivers/scsi/gvp11.c
+++ b/drivers/scsi/gvp11.c
@@ -381,7 +381,7 @@ static int gvp11_probe(struct zorro_dev *z, const struct zorro_device_id *ent)
 			dev_warn(&z->dev, "cannot use DMA mask %llx\n",
 				 TO_DMA_MASK(gvp11_xfer_mask));
 			error = -ENODEV;
-			goto fail_check_or_alloc;
+			goto fail_irq;
 		}
 	} else
 		hdata->wh.dma_xfer_mask = default_dma_xfer_mask;
-- 
2.39.5 (Apple Git-154)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-03-18 13:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-18 13:05 [PATCH] scsi: gvp11: Fix error path after scsi_host_alloc Miaoqian Lin

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