Make setting partitions a litte bit more robust. Signed-off-by: Teresa Remmet <t.remmet@xxxxxxxxx> --- drivers/mtd/core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c index fda9034..3bdf441 100644 --- a/drivers/mtd/core.c +++ b/drivers/mtd/core.c @@ -386,6 +386,9 @@ static int mtd_partition_set(struct device_d *dev, struct param_d *p, const char struct mtd_info *mtdpart, *tmp; int ret; + if (!val) + return -EINVAL; + list_for_each_entry_safe(mtdpart, tmp, &mtd->partitions, partitions_entry) { ret = mtd_del_partition(mtdpart); if (ret) -- 1.9.1 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox