Skip to contentSkip to conversation

scsi: gvp11: Fix error path after scsi_host_alloc

PATCH New Miaoqian Lin 1 participant 1 message Mar 18, 2025 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: gvp11: Fix error path after scsi_host_alloc

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")
---
 drivers/scsi/gvp11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/gvp11.c +1 -1
index 0420bfe9bd42..272ea2d1c8fd 100644
@@ -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;
Signature · 1 line
2.39.5 (Apple Git-154)