Skip to content

Commit aa578e8

Browse files
tititiou36hdeller
authored andcommitted
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>
1 parent 8423895 commit aa578e8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/video/fbdev/hpfb.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
345345
if (hpfb_init_one(paddr, vaddr)) {
346346
if (d->scode >= DIOII_SCBASE)
347347
iounmap((void *)vaddr);
348+
release_mem_region(d->resource.start, resource_size(&d->resource));
348349
return -ENOMEM;
349350
}
350351
return 0;

0 commit comments

Comments
 (0)