cpu/x86/mp_init.c: Fix error treatment
In procedure allocate_cpu_devices(), if structure pointer new is null skip using the pointer. Add a "continue;" to skip using the pointer. The issue was found by static analysis tool. BUG=b:112253891 TEST=Build and boot grunt. Change-Id: I7011fbfa0725f22a6dfbca6752e668eddac3463c Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Reviewed-on: https://review.coreboot.org/27951 Reviewed-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
cc9b3348d2
commit
569711a4ff
|
@ -404,6 +404,7 @@ static int allocate_cpu_devices(struct bus *cpu_bus, struct mp_params *p)
|
||||||
if (new == NULL) {
|
if (new == NULL) {
|
||||||
printk(BIOS_CRIT, "Could not allocate CPU device\n");
|
printk(BIOS_CRIT, "Could not allocate CPU device\n");
|
||||||
max_cpus--;
|
max_cpus--;
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
new->name = processor_name;
|
new->name = processor_name;
|
||||||
cpus[i].dev = new;
|
cpus[i].dev = new;
|
||||||
|
|
Loading…
Reference in New Issue