The pmqos list contains only one scenario like UltraPowerSaving
and when receiving the unmated scenario name like AppLaunch with unlock info
with that duration is zero, the last scenario will be unlocked.
In order to fix this issuse, correct the conditional statement.
Change-Id: Ica2a3a3f44d02dfd07e3cb57e1dab300decee9d0
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
*/
static int pmqos_cancel(const char *name)
{
- GList *elem;
+ GList *elem = NULL;
struct pmqos_cpu *cpu;
/* Find previous request */
- cpu = NULL;
for (elem = pmqos_head; elem != NULL; elem = elem->next) {
cpu = elem->data;
if (!strcmp(cpu->name, name))
}
/* no cpu */
- if (!cpu)
+ if (!elem)
return 0;
/* unlock cpu */