Re: [PATCH] MTD: nand: Fix release_mem_region() size
From: Miquel Raynal
Date: Wed Oct 14 2026 - 05:28:18 EST
Hi Thomas,
> In au1550nd_probe(), request_mem_region() is called with size
> resource_size(r), and release_mem_region() is called in the error path
> with the same size. Howeve, in the cleanup function au1550nd_remove()
> calls release_mem_region() with size 0x1000.
>
> Change release size to match request.
>
> Fixes: b67a1a02d463 ("MTD: nand: make au1550nd.c a platform_driver")
> Signed-off-by: Thomas Fourier <fourier.thomas@xxxxxxxxx>
> ---
This driver is very old. If you care about cleaning it up, I would
suggest doing something bigger. For instance platform_get_resource,
request_mem_region and ioremap are now a single helper named
devm_platform_ioremap_resource(). The kzalloc could also become device
managed. This will further reduce the size of the error path and the
removal.
The subject prefix btw should be updated to match today's standards (see
git log --oneline -- drivers/mtd/nand/raw/).
Do you own the hardware?
Thanks,
Miquèl