]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/devfreq/devfreq.c
Merge branch 'pm-devfreq'
[~shefty/rdma-dev.git] / drivers / devfreq / devfreq.c
index a8f01735054dab0730b91182b3895a78bdfff0af..53766f39aaddfd5db9147842b40825fb1399453b 100644 (file)
@@ -1005,14 +1005,14 @@ struct opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq,
                opp = opp_find_freq_floor(dev, freq);
 
                /* If not available, use the closest opp */
-               if (opp == ERR_PTR(-ENODEV))
+               if (opp == ERR_PTR(-ERANGE))
                        opp = opp_find_freq_ceil(dev, freq);
        } else {
                /* The freq is an lower bound. opp should be higher */
                opp = opp_find_freq_ceil(dev, freq);
 
                /* If not available, use the closest opp */
-               if (opp == ERR_PTR(-ENODEV))
+               if (opp == ERR_PTR(-ERANGE))
                        opp = opp_find_freq_floor(dev, freq);
        }