[PATCH -next] mtd: Add WARN_ON_ONCE() to mtd_read() to check the return value

Miquel Raynal miquel.raynal at bootlin.com
Mon Oct 16 02:28:44 PDT 2023


On Tue, 2023-09-26 at 06:57:33 UTC, ZhaoLong Wang wrote:
> If the driver cannot read all the requested data, -EBADMSG or
> -EUCLEAN should never be returned.
> 
> Add a WARN_ON_ONCE() to help driver developers detect this error.
> 
> Signed-off-by: ZhaoLong Wang <wangzhaolong1 at huawei.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel



More information about the linux-mtd mailing list