[PATCH 1/2] mtd: peb: return success for reading/writing 0 bytes

2022-11-23 Thread Sascha Hauer
Return successfully when mtd_peb_read() or mtd_peb_write() is passed a zero length so that the callers do not have to handle this case. Signed-off-by: Sascha Hauer --- drivers/mtd/peb.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/mtd/peb.c b/drivers/mtd/pe

[PATCH 2/2] fastboot: ubiformat: Fix writing sparse images

2022-11-23 Thread Sascha Hauer
in ubiformat_write() we may not write trailing empty areas in erase blocks as UBI assumes them to be empty and writable. This code path is used when fastboot handles sparse images. Signed-off-by: Sascha Hauer --- common/ubiformat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff