[MTD] Don't oops when the RedBoot partition table is empty

This fixes a regression with the RedBoot parsing code introduced by
commit 0b47d65408

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
Martin Michlmayr 2007-02-02 19:14:41 +01:00 committed by David Woodhouse
parent d24030f0f7
commit 678c857f3c

View file

@ -122,7 +122,7 @@ static int parse_redboot_partitions(struct mtd_info *master,
}
}
break;
} else {
} else if (buf[i].size != -1) {
/* re-calculate of real numslots */
numslots = buf[i].size / sizeof(struct fis_image_desc);
}