summaryrefslogtreecommitdiff
path: root/device_tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'device_tree.c')
-rw-r--r--device_tree.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/device_tree.c b/device_tree.c
index 0e7fe2dda6..10cf3d0b60 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -240,11 +240,8 @@ uint32_t qemu_devtree_alloc_phandle(void *fdt)
* which phandle id to start allocting phandles.
*/
if (!phandle) {
- const char *phandle_start = qemu_opt_get(qemu_get_machine_opts(),
- "phandle_start");
- if (phandle_start) {
- phandle = strtoul(phandle_start, NULL, 0);
- }
+ phandle = qemu_opt_get_number(qemu_get_machine_opts(),
+ "phandle_start", 0);
}
if (!phandle) {