drivers/auxdisplay/arm-charlcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
It seems like, after the request_mem_region(), the corresponding
release_mem_region() must take the same size. This was done
in charlcd_remove() but not in the error path in charlcd_probe().
Fixes: ce8962455e90 ("ARM: 6214/2: driver for the character LCD found in ARM refdesigns")
Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
---
drivers/auxdisplay/arm-charlcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/auxdisplay/arm-charlcd.c b/drivers/auxdisplay/arm-charlcd.c
index a7eae99a48f7..4e22882f57c9 100644
--- a/drivers/auxdisplay/arm-charlcd.c
+++ b/drivers/auxdisplay/arm-charlcd.c
@@ -323,7 +323,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
out_no_irq:
iounmap(lcd->virtbase);
out_no_memregion:
- release_mem_region(lcd->phybase, SZ_4K);
+ release_mem_region(lcd->phybase, lcd->physize);
out_no_resource:
kfree(lcd);
return ret;
--
2.43.0
Hi Thomas,
Thanks for your patch!
The patch prefix should be "auxdisplay: arm-charlcd:", not an rmk
patch tracker ID.
On Tue, 16 Dec 2025 at 18:49, Thomas Fourier <fourier.thomas@gmail.com> wrote:
> It seems like, after the request_mem_region(), the corresponding
> release_mem_region() must take the same size. This was done
> in charlcd_remove() but not in the error path in charlcd_probe().
Unfortunately charlcd_remove() was removed in one of these silly
"make <foo> explicitly non-modular" patches...
> Fixes: ce8962455e90 ("ARM: 6214/2: driver for the character LCD found in ARM refdesigns")
> Signed-off-by: Thomas Fourier <fourier.thomas@gmail.com>
> --- a/drivers/auxdisplay/arm-charlcd.c
> +++ b/drivers/auxdisplay/arm-charlcd.c
> @@ -323,7 +323,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
> out_no_irq:
> iounmap(lcd->virtbase);
> out_no_memregion:
Looks like the first "goto out_no_memregion" is incorrect, and should be
"goto out_no_resource".
> - release_mem_region(lcd->phybase, SZ_4K);
> + release_mem_region(lcd->phybase, lcd->physize);
> out_no_resource:
> kfree(lcd);
> return ret;
The actual change LGTM to me, so
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
© 2016 - 2025 Red Hat, Inc.