[PATCH] parisc: fix lmmio_space resource leak in eisa_probe() error path

From: zhangjiao2

Date: Fri Dec 04 2026 - 04:53:06 EST


From: zhang jiao <zhangjiao2@xxxxxxxxxxxxxxxxxxxx>

The error recovery path in eisa_probe() only releases io_space but not
lmmio_space, which was acquired earlier via ccio_request_resource() at
line 310. The error_release label is reached via three paths:

1. request_irq() failure (goto error_release)
2. ioremap() failure (goto error_free_irq, falls to error_release)
3. eisa_root_register() failure (goto error_iounmap, falls through to
error_free_irq then error_release)

In all cases, lmmio_space remains held but never released, causing a
resource leak.

Fix by adding release_resource(&eisa_dev.hba.lmmio_space) to the error
cleanup path.

Signed-off-by: zhang jiao <zhangjiao2@xxxxxxxxxxxxxxxxxxxx>
---
drivers/parisc/eisa.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index ce0c75dbf2d2..53a7621ab5ff 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -383,6 +383,7 @@ static int __init eisa_probe(struct parisc_device *dev)
free_irq(dev->irq, &eisa_dev);
error_release:
release_resource(&eisa_dev.hba.io_space);
+ release_resource(&eisa_dev.hba.lmmio_space);
return result;
}

--
2.33.0