]> git.ipfire.org Git - thirdparty/openwrt.git/commit
kernel: mtdsplit_h3c_vfs: return 0 for non-fatal errors 19475/head
authorJan Hoffmann <jan@3e8.eu>
Sun, 20 Jul 2025 17:07:29 +0000 (19:07 +0200)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 27 Jul 2025 16:24:50 +0000 (18:24 +0200)
commit6fa1775348d5415129db12c05a993c8571c867c2
treeb0b8a3b3de8a8765feffd067dd1270a1e8e7b2ab
parent4f716eb43a5b68dc4effdfad64a453b87821dd1b
kernel: mtdsplit_h3c_vfs: return 0 for non-fatal errors

Since Linux 6.7, introduced with commit 5c2f7727d437 ("mtd: mtdpart:
check for subpartitions parsing result"), errors during subpartition
parsing cause all MTD partitions to be torn down.

Since the current mtdsplit driver for devices using H3C VFS returns
-EINVAL if it does not find a file system containing an OpenWrt image,
this makes initial installation of OpenWrt impossible.

Work around this by returning 0 when the file system contains unexpected
data. Also print a message in this case to show what is going on.

Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Link: https://github.com/openwrt/openwrt/pull/19475
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_h3c_vfs.c