[PATCH] scsi: bvme6000: fix request_irq failure cleanup

From: Ziheng Wei

Date: Mon Nov 23 2026 - 05:24:26 EST


NCR_700_detect() registers the SCSI host and allocates the script DMA
memory. If request_irq() fails, bvme6000_probe() only drops the host
reference, leaving the host registered and the DMA memory allocated.

Unregister the host and release the NCR_700 resources before dropping the
reference.

Reported-by: Sashiko <sashiko-bot@xxxxxxxxxx>
Link: https://lore.kernel.org/linux-scsi/sashiko-outbox-228089@xxxxxxxxxx/
Fixes: 8276b58af4dd ("[SCSI] 53c700: m68k BVME6000 NCR53C710 SCSI")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Ziheng Wei <zihengw03@xxxxxxx>
---
drivers/scsi/bvme6000_scsi.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/scsi/bvme6000_scsi.c b/drivers/scsi/bvme6000_scsi.c
--- a/drivers/scsi/bvme6000_scsi.c
+++ b/drivers/scsi/bvme6000_scsi.c
@@ -86,6 +86,8 @@ bvme6000_probe(struct platform_device *dev)
return 0;

out_put_host:
+ scsi_remove_host(host);
+ NCR_700_release(host);
scsi_host_put(host);
out_free:
kfree(hostdata);

base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
--
2.43.0