cpufreq_ondemand: Fix optimal_freq logic on ramp down