if (!genpd->power_on)
goto out;
+ timed = timed && genpd->gd;
if (!timed) {
ret = genpd->power_on(genpd);
if (ret)
goto out;
genpd->states[state_idx].power_on_latency_ns = elapsed_ns;
- if (genpd->gd)
- genpd->gd->max_off_time_changed = true;
+ genpd->gd->max_off_time_changed = true;
pr_debug("%s: Power-%s latency exceeded, new value %lld ns\n",
genpd->name, "on", elapsed_ns);
if (!genpd->power_off)
goto out;
+ timed = timed && genpd->gd;
if (!timed) {
ret = genpd->power_off(genpd);
if (ret)
goto out;
genpd->states[state_idx].power_off_latency_ns = elapsed_ns;
- if (genpd->gd)
- genpd->gd->max_off_time_changed = true;
+ genpd->gd->max_off_time_changed = true;
pr_debug("%s: Power-%s latency exceeded, new value %lld ns\n",
genpd->name, "off", elapsed_ns);