From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Thomas Fourier <fourier.thomas@gmail.com>
Cc: Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Kees Cook <kees@kernel.org>,
Manuel Lauss <manuel.lauss@googlemail.com>,
Artem Bityutskiy <dedekind1@gmail.com>,
linux-mtd@lists.infradead.org (open list:NAND FLASH SUBSYSTEM),
linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH] MTD: nand: Fix release_mem_region() size
Date: Wed, 14 Oct 2026 11:23:13 +0200 [thread overview]
Message-ID: <87jynky6ta.fsf@bootlin.com> (raw)
In-Reply-To: <20261014082258.33315-2-fourier.thomas@gmail.com> (Thomas Fourier's message of "Wed, 14 Oct 2026 10:22:51 +0200")
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@gmail.com>
> ---
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
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
prev parent reply other threads:[~2026-10-14 9:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 8:22 [PATCH] MTD: nand: Fix release_mem_region() size Thomas Fourier
2026-10-14 9:23 ` Miquel Raynal [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jynky6ta.fsf@bootlin.com \
--to=miquel.raynal@bootlin.com \
--cc=dedekind1@gmail.com \
--cc=fourier.thomas@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=manuel.lauss@googlemail.com \
--cc=richard@nod.at \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.