[RAMEN9610-11191] sched: ems: check empty of gb-list
authorPark Bumgyu <bumgyu.park@samsung.com>
Mon, 21 Jan 2019 07:55:53 +0000 (16:55 +0900)
committerCosmin Tanislav <demonsingur@gmail.com>
Mon, 22 Apr 2024 17:24:58 +0000 (20:24 +0300)
Change-Id: I942b1f9cb43f46c3e90511c58c77a5254d45f15c
Signed-off-by: Park Bumgyu <bumgyu.park@samsung.com>
kernel/sched/ems/global_boost.c

index c6df8d28144ef7ad5bd5e558cf10a50ac399b8fc..b7617a8c532bad815a588da253bde6b3f064d9b3 100644 (file)
@@ -22,6 +22,9 @@ static struct plist_head gb_list = PLIST_HEAD_INIT(gb_list);
 
 static int gb_qos_value(void)
 {
+       if (plist_head_empty(&gb_list))
+               return 0;
+
        return plist_last(&gb_list)->prio;
 }