From: Christophe JAILLET Date: Thu, 1 Aug 2024 20:34:39 +0000 (+0200) Subject: fbdev: hpfb: Fix an error handling path in hpfb_dio_probe() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=aa578e897520f32ae12bec487f2474357d01ca9c;p=users%2Fjedix%2Flinux-maple.git 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 Signed-off-by: Helge Deller --- diff --git a/drivers/video/fbdev/hpfb.c b/drivers/video/fbdev/hpfb.c index 66fac8e5393e0..a1144b1509826 100644 --- a/drivers/video/fbdev/hpfb.c +++ b/drivers/video/fbdev/hpfb.c @@ -345,6 +345,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;