Turning on sched_use_pelt causes a null-pointer dereference in
scheduler. Add correct checking of varable.
CRs-fixed:
1042656
Change-Id: I6e6a57e24b41e4b3d049bfcf694b9ad7e2144dd5
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
return 0;
sa->last_update_time = now;
- if (sched_use_pelt && !cfs_rq && weight) {
+ if (sched_use_pelt && cfs_rq && weight) {
se = container_of(sa, struct sched_entity, avg);
if (entity_is_task(se) && se->on_rq)
dec_hmp_sched_stats_fair(rq_of(cfs_rq), task_of(se));