* [PATCH] media: cx25821: Fix a resource leak in cx25821_dev_setup()
@ 2026-01-03 7:46 Haoxiang Li
2026-01-03 15:22 ` Markus Elfring
0 siblings, 1 reply; 2+ messages in thread
From: Haoxiang Li @ 2026-01-03 7:46 UTC (permalink / raw)
To: mchehab; +Cc: linux-media, linux-kernel, Haoxiang Li
Add release_mem_region() if ioremap() fails to release the memory
region obtained by cx25821_get_resources().
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
---
drivers/media/pci/cx25821/cx25821-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/pci/cx25821/cx25821-core.c b/drivers/media/pci/cx25821/cx25821-core.c
index 6627fa9166d3..a7336be44474 100644
--- a/drivers/media/pci/cx25821/cx25821-core.c
+++ b/drivers/media/pci/cx25821/cx25821-core.c
@@ -908,6 +908,7 @@ static int cx25821_dev_setup(struct cx25821_dev *dev)
if (!dev->lmmio) {
CX25821_ERR("ioremap failed, maybe increasing __VMALLOC_RESERVE in page.h\n");
+ release_mem_region(dev->base_io_addr, pci_resource_len(dev->pci, 0));
cx25821_iounmap(dev);
return -ENOMEM;
}
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-01-03 15:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-03 7:46 [PATCH] media: cx25821: Fix a resource leak in cx25821_dev_setup() Haoxiang Li
2026-01-03 15:22 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®