diff options
Diffstat (limited to 'drivers/devfreq')
-rw-r--r-- | drivers/devfreq/devfreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index b146d76f04cf..4fa1a22c55ea 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c | |||
@@ -656,14 +656,14 @@ struct opp *devfreq_recommended_opp(struct device *dev, unsigned long *freq, | |||
656 | opp = opp_find_freq_floor(dev, freq); | 656 | opp = opp_find_freq_floor(dev, freq); |
657 | 657 | ||
658 | /* If not available, use the closest opp */ | 658 | /* If not available, use the closest opp */ |
659 | if (opp == ERR_PTR(-ENODEV)) | 659 | if (opp == ERR_PTR(-ERANGE)) |
660 | opp = opp_find_freq_ceil(dev, freq); | 660 | opp = opp_find_freq_ceil(dev, freq); |
661 | } else { | 661 | } else { |
662 | /* The freq is an lower bound. opp should be higher */ | 662 | /* The freq is an lower bound. opp should be higher */ |
663 | opp = opp_find_freq_ceil(dev, freq); | 663 | opp = opp_find_freq_ceil(dev, freq); |
664 | 664 | ||
665 | /* If not available, use the closest opp */ | 665 | /* If not available, use the closest opp */ |
666 | if (opp == ERR_PTR(-ENODEV)) | 666 | if (opp == ERR_PTR(-ERANGE)) |
667 | opp = opp_find_freq_floor(dev, freq); | 667 | opp = opp_find_freq_floor(dev, freq); |
668 | } | 668 | } |
669 | 669 | ||