mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 14:21:47 +00:00
PM / devfreq: Skip status update on uninitialized previous_freq
In case devfreq->previous_freq is still uninitialized in devfreq_update_status(), i.e. it has value '0', the lookups in that function fail, eventually leading to some error message: [ 3.041292] devfreq bus_dmc: Couldn't update frequency transition information. Just skip the statup update in this situation. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
0f376c9cd8
commit
d0563a039c
@ -137,6 +137,10 @@ static int devfreq_update_status(struct devfreq *devfreq, unsigned long freq)
|
||||
|
||||
cur_time = jiffies;
|
||||
|
||||
/* Immediately exit if previous_freq is not initialized yet. */
|
||||
if (!devfreq->previous_freq)
|
||||
goto out;
|
||||
|
||||
prev_lev = devfreq_get_freq_level(devfreq, devfreq->previous_freq);
|
||||
if (prev_lev < 0) {
|
||||
ret = prev_lev;
|
||||
|
Loading…
Reference in New Issue
Block a user