Skip to content

Commit 678c857

Browse files
tbmdwmw2
authored andcommitted
[MTD] Don't oops when the RedBoot partition table is empty
This fixes a regression with the RedBoot parsing code introduced by commit 0b47d65 Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
1 parent d24030f commit 678c857

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/mtd/redboot.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
122122
}
123123
}
124124
break;
125-
} else {
125+
} else if (buf[i].size != -1) {
126126
/* re-calculate of real numslots */
127127
numslots = buf[i].size / sizeof(struct fis_image_desc);
128128
}

0 commit comments

Comments
 (0)