Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
riscv: add NULL check before calling strlen in the riscv cpu's get_de…
…sc() Without the NULL check, if the devicetree that u-boot loads does not have a compatible property then a store access fault will be raised and force the machine to reset, due to the NULL pointer we passed to strlen. This commit adds this check and will return -ENOSPC to indicate the get_desc failed. Signed-off-by: Hanyuan Zhao <[email protected]> Reviewed-by: Leo Yu-Chi Liang <[email protected]>
- Loading branch information