Add missing checks of return value
This commit is contained in:
parent
a0a70b1ffc
commit
dc2a016c6b
@ -35,10 +35,16 @@ pre_thread_execute(struct emu *emu, struct thread *th)
|
|||||||
dbg("thread %d runs in %s", th->tid, cpu->name);
|
dbg("thread %d runs in %s", th->tid, cpu->name);
|
||||||
|
|
||||||
/* First set the CPU in the thread */
|
/* First set the CPU in the thread */
|
||||||
thread_set_cpu(th, cpu);
|
if (thread_set_cpu(th, cpu) != 0) {
|
||||||
|
err("thread_set_cpu failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Then set the thread to running state */
|
/* Then set the thread to running state */
|
||||||
thread_set_state(th, TH_ST_RUNNING);
|
if (thread_set_state(th, TH_ST_RUNNING) != 0) {
|
||||||
|
err("thread_set_state failed");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* And then add the thread to the CPU, so tracking channels see the
|
/* And then add the thread to the CPU, so tracking channels see the
|
||||||
* updated thread state */
|
* updated thread state */
|
||||||
|
@ -543,7 +543,10 @@ system_connect(struct system *sys, struct bay *bay, struct recorder *rec)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
cpu_add_to_pcf_type(cpu, affinity_type);
|
if (cpu_add_to_pcf_type(cpu, affinity_type) == NULL) {
|
||||||
|
err("cpu_add_to_pcf_type failed for cpu '%s'", cpu->name);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user