mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/7] mtd: core: Check partitions for empty string
@ 2015-07-17 11:13 Teresa Remmet
  2015-07-17 11:13 ` [PATCH 2/7] drivers: i2c: Only register available devices Teresa Remmet
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Teresa Remmet @ 2015-07-17 11:13 UTC (permalink / raw)
  To: barebox

Make setting partitions a litte bit more robust.

Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
---
 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-07-20  5:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17 11:13 [PATCH 1/7] mtd: core: Check partitions for empty string Teresa Remmet
2015-07-17 11:13 ` [PATCH 2/7] drivers: i2c: Only register available devices Teresa Remmet
2015-07-17 14:59   ` Jan Lübbe
2015-07-17 11:13 ` [PATCH 3/7] ARM: dts: am335x-phytec boards: Fixup spi flash node name Teresa Remmet
2015-07-17 11:13 ` [PATCH 4/7] ARM: dts: phyFLEX-AM335x-som: Disable eeprom on default Teresa Remmet
2015-07-17 11:13 ` [PATCH 5/7] ARM: phytec-som-am335x: Add support for 1024MiB RAM on one chip Teresa Remmet
2015-07-17 11:13 ` [PATCH 6/7] ARM: dts: Add support for all phyCORE-AM335x options Teresa Remmet
2015-07-17 11:13 ` [PATCH 7/7] ARM: dts: Add support for all phyFLEX-AM335x options Teresa Remmet
2015-07-20  5:14 ` [PATCH 1/7] mtd: core: Check partitions for empty string Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox