mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-06 17:35:20 +02:00
fbdev: hpfb: Fix an error handling path in hpfb_dio_probe()
[ Upstream commitaa578e8975
] If an error occurs after request_mem_region(), a corresponding release_mem_region() should be called, as already done in the remove function. Fixes:1da177e4c3
("Linux-2.6.12-rc2") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
508a550eec
commit
9b97d6b08b
|
@ -343,6 +343,7 @@ static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
|
|||
if (hpfb_init_one(paddr, vaddr)) {
|
||||
if (d->scode >= DIOII_SCBASE)
|
||||
iounmap((void *)vaddr);
|
||||
release_mem_region(d->resource.start, resource_size(&d->resource));
|
||||
return -ENOMEM;
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user