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: ZhaoLong Wang <wangzhaolong1@huawei.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230926065733.3240322-1-wangzhaolong1@huawei.com
Showing
Please register or sign in to comment