diff options
| author | Tom Rini <[email protected]> | 2024-05-14 07:45:49 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-05-14 07:45:49 -0600 |
| commit | 676903c1b97578a82c82a40293d4939cf687d9d9 (patch) | |
| tree | 9a593aaa8cd82edb4c23146ebcfdc748e2e5a484 /drivers/cpu | |
| parent | d456f2fc54ebfa4215b310594b85b34d127c3b14 (diff) | |
| parent | 2b8dc36b4c515979da330a96d9fcc9bbbe5385fa (diff) | |
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/20690
- RISC-V: Add NULL check after parsing compatible string
- Board: Add Milk-V Mars CM board
- Andes: Unify naming policy
Diffstat (limited to 'drivers/cpu')
| -rw-r--r-- | drivers/cpu/riscv_cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpu/riscv_cpu.c b/drivers/cpu/riscv_cpu.c index 4f2958a23ce..4fff4658b5f 100644 --- a/drivers/cpu/riscv_cpu.c +++ b/drivers/cpu/riscv_cpu.c @@ -23,7 +23,7 @@ static int riscv_cpu_get_desc(const struct udevice *dev, char *buf, int size) const char *cpu; cpu = dev_read_string(dev, "compatible"); - if (size < (strlen(cpu) + 1)) + if (!cpu || size < (strlen(cpu) + 1)) return -ENOSPC; strcpy(buf, cpu); |
