diff options
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/Kconfig | 1 | ||||
-rw-r--r-- | drivers/mtd/ubi/io.c | 7 | ||||
-rw-r--r-- | drivers/mtd/ubispl/ubispl.c | 2 |
3 files changed, 3 insertions, 7 deletions
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig index e505f797949..06941a4fa8b 100644 --- a/drivers/mtd/Kconfig +++ b/drivers/mtd/Kconfig @@ -41,6 +41,7 @@ config MTD_BLOCK config SYS_MTDPARTS_RUNTIME bool "Allow MTDPARTS to be configured at runtime" + depends on !COMPILE_TEST help This option allows to call the function board_mtdparts_default to dynamically build the variables mtdids and mtdparts at runtime. diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 45699b4a477..2ec968c85ff 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -936,12 +936,7 @@ static int validate_vid_hdr(const struct ubi_device *ubi, ubi_err(ubi, "bad data_size"); goto bad; } - } else if (lnum == used_ebs - 1) { - if (data_size == 0) { - ubi_err(ubi, "bad data_size at last LEB"); - goto bad; - } - } else { + } else if (lnum != used_ebs - 1) { ubi_err(ubi, "too high lnum"); goto bad; } diff --git a/drivers/mtd/ubispl/ubispl.c b/drivers/mtd/ubispl/ubispl.c index 9face5fae15..0143caa051d 100644 --- a/drivers/mtd/ubispl/ubispl.c +++ b/drivers/mtd/ubispl/ubispl.c @@ -779,7 +779,7 @@ static int ubi_scan_fastmap(struct ubi_scan_info *ubi, * that already so we merily copy it over. */ if (pnum == fm_anchor) - memcpy(vh, ubi->blockinfo + pnum, sizeof(*fm)); + memcpy(vh, ubi->blockinfo + pnum, sizeof(*vh)); if (i == 0) { if (be32_to_cpu(vh->vol_id) != UBI_FM_SB_VOLUME_ID) { |