summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Pargmann <mpa@pengutronix.de>2016-07-15 15:03:12 +0200
committerMarkus Pargmann <mpa@pengutronix.de>2016-07-15 15:03:12 +0200
commitc7daa20b3e7b1b83a3c7cc4da3611597c67d4014 (patch)
tree4a952d929ec764aae120529668a954dbba9214e8
parente932629ed47c800060c8e6f9a4750cef3b87b21f (diff)
fixup! libdt: add block devicepath extractiontopic/blockdev
-rw-r--r--src/libdt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libdt.c b/src/libdt.c
index a509878..7ac7d85 100644
--- a/src/libdt.c
+++ b/src/libdt.c
@@ -2295,11 +2295,13 @@ int of_get_devicepath(struct device_node *partition_node, char **devpath, off_t
return udev_parse_eeprom(dev, devpath);
} else {
/* try to find a block device */
- ret = device_find_block_device(dev, devpath);
- if (!ret)
+ ret = udev_parse_mtd(dev, devpath, size);
+ if (ret) {
+ ret = device_find_block_device(dev, devpath);
+ if (ret)
+ return ret;
return of_parse_partition(partition_node, offset, size);
- else
- return udev_parse_mtd(dev, devpath, size);
+ }
}
}