PM / devfreq: Skip status update on uninitialized previous_freq
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Thu, 29 Sep 2016 12:36:36 +0000 (14:36 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 10 Oct 2016 22:01:20 +0000 (00:01 +0200)
commitd0563a039c9d35305f4cb2405665130de596d86a
treef533835dc7c60f982ad13d70333879d011e0664c
parent0f376c9cd86c23f37312d37748b233660ef9d9af
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>
drivers/devfreq/devfreq.c