mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
media: cx25821: Fix a resource leak in cx25821_dev_setup()
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> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
597f8851c9
commit
68cd8ac994
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user