Skip to content
Commit 0339f62a authored by ZhaoLong Wang's avatar ZhaoLong Wang Committed by Miquel Raynal
Browse files

mtd: Add WARN_ON_ONCE() to mtd_read() to check the return value



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: default avatarZhaoLong Wang <wangzhaolong1@huawei.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230926065733.3240322-1-wangzhaolong1@huawei.com
parent 3cff177f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment