diff options
Diffstat (limited to 'hw/riscv/virt.c')
-rw-r--r-- | hw/riscv/virt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 6bd723d..4a137a5 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -254,7 +254,9 @@ static void *create_fdt(RISCVVirtState *s, const struct MemmapEntry *memmap, qemu_fdt_add_subnode(fdt, "/chosen"); qemu_fdt_setprop_string(fdt, "/chosen", "stdout-path", nodename); - qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + if (cmdline) { + qemu_fdt_setprop_string(fdt, "/chosen", "bootargs", cmdline); + } g_free(nodename); return fdt; |