hw/riscv/boot: Check the error of fdt_pack()
commitb3d8aa20692b1baed299790f4a65d6b0cfb1a0bc
authorAlistair Francis <alistair.francis@wdc.com>
Wed, 14 Jul 2021 23:01:22 +0000 (15 09:01 +1000)
committerAlistair Francis <alistair.francis@wdc.com>
Wed, 14 Jul 2021 23:35:46 +0000 (15 09:35 +1000)
tree4f291544450dcb5d3e1c52f103164cb2fe18b661
parentbb7e0cde3cbd59e8b7d6e0e9c67e11f76cbe64d4
hw/riscv/boot: Check the error of fdt_pack()

Coverity reports that we don't check the error result of fdt_pack(), so
let's save the result and assert that it is 0.

Fixes: Coverity CID 1458136
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Message-id: 07325315b49d5555269f76094e4bc5296e0643b9.1626303527.git.alistair.francis@wdc.com
hw/riscv/boot.c