kernel: mtdsplit_minor: 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 <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2025-11-20 23:41:30 +01:00
parent 91a9fb7460
commit f9eaa1cf1f
No known key found for this signature in database
GPG Key ID: AC001D09ADBFEAD7

View File

@ -71,17 +71,17 @@ static int mtdsplit_parse_minor(struct mtd_info *master,
/* match header */
if (hdr.yaffs_type != YAFFS_OBJECT_TYPE_FILE)
return -EINVAL;
return -ENOENT;
if (hdr.yaffs_obj_id != YAFFS_OBJECTID_ROOT)
return -EINVAL;
return -ENOENT;
if (hdr.yaffs_sum_unused != YAFFS_SUM_UNUSED)
return -EINVAL;
return -ENOENT;
if ((memcmp(hdr.yaffs_name, YAFFS_NAME_KERNEL, sizeof(YAFFS_NAME_KERNEL))) &&
(memcmp(hdr.yaffs_name, YAFFS_NAME_BOOTIMAGE, sizeof(YAFFS_NAME_BOOTIMAGE))))
return -EINVAL;
return -ENOENT;
err = mtd_find_rootfs_from(master, master->erasesize, master->size,
&rootfs_offset, NULL);