From: Christian Marangi Date: Thu, 20 Nov 2025 22:24:01 +0000 (+0100) Subject: kernel: mtdsplit_h3c_vfs: use -ENOENT instead of -ENODEV X-Git-Tag: v25.12.0-rc1~407 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2acf18bf4deb7d431e4ef3858ae8969a481fe196;p=thirdparty%2Fopenwrt.git kernel: mtdsplit_h3c_vfs: use -ENOENT instead of -ENODEV New linux version will check the return code of parser on subpartitions. The only valid case for skipping a parser with an error is -ENOENT. Change the relevant entry to -ENOENT. Signed-off-by: Christian Marangi --- diff --git a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_h3c_vfs.c b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_h3c_vfs.c index f264233dbd9..a766ff7c2fb 100644 --- a/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_h3c_vfs.c +++ b/target/linux/generic/files/drivers/mtd/mtdsplit/mtdsplit_h3c_vfs.c @@ -99,7 +99,9 @@ static int mtdsplit_h3c_vfs_parse(struct mtd_info *mtd, return -EIO; if (format_flag != FORMAT_FLAG) - return -EINVAL; + pr_debug("mtdsplit_h3c_vfs: unexpected format flag %08x\n", + format_flag); + return -ENOENT; /* Check file entry */ err = mtd_read(mtd, FILE_ENTRY_OFFSET, sizeof(file_entry), &retlen, @@ -111,19 +113,19 @@ static int mtdsplit_h3c_vfs_parse(struct mtd_info *mtd, return -EIO; if (file_entry.flags != FILE_ENTRY_FLAGS) - return -EINVAL; + return -ENOENT; if (file_entry.parent_block != FILE_ENTRY_PARENT_BLOCK) - return -EINVAL; + return -ENOENT; if (file_entry.parent_index != FILE_ENTRY_PARENT_INDEX) - return -EINVAL; + return -ENOENT; if (file_entry.data_block != FILE_ENTRY_DATA_BLOCK) - return -EINVAL; + return -ENOENT; if (strncmp(file_entry.name, FILE_ENTRY_NAME, sizeof(file_entry.name)) != 0) - return -EINVAL; + return -ENOENT; /* Find rootfs offset */ kernel_size = block_offset(file_entry.data_block +