Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: hpfb: Fix an error handling path in hpfb_dio_probe()

If an error occurs after request_mem_region(), a corresponding
release_mem_region() should be called, as already done in the remove
function.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Helge Deller <deller@gmx.de>

authored by

Christophe JAILLET and committed by
Helge Deller
aa578e89 8423895d

+1
+1
drivers/video/fbdev/hpfb.c
··· 345 345 if (hpfb_init_one(paddr, vaddr)) { 346 346 if (d->scode >= DIOII_SCBASE) 347 347 iounmap((void *)vaddr); 348 + release_mem_region(d->resource.start, resource_size(&d->resource)); 348 349 return -ENOMEM; 349 350 } 350 351 return 0;