From: Chanwoo Choi Date: Thu, 23 Jun 2016 02:18:43 +0000 (+0900) Subject: PM / devfreq: Send the DEVFREQ_POSTCHANGE notification when target() is failed X-Git-Tag: v4.7-rc5~16^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d37189e80163c653771916afe28fae1a8d14daa;p=platform%2Fkernel%2Flinux-exynos.git PM / devfreq: Send the DEVFREQ_POSTCHANGE notification when target() is failed This patch sends the DEVFREQ_POSTCHANGE notification when devfreq->profile->targer() is failed. The PRECHANGE/POSTCHANGE should be paired. Fixes: 0fe3a66410a3 (PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier) Reported-by: Lin Huang Signed-off-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index c7f47e3..e92418f 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -268,8 +268,11 @@ int update_devfreq(struct devfreq *devfreq) devfreq_notify_transition(devfreq, &freqs, DEVFREQ_PRECHANGE); err = devfreq->profile->target(devfreq->dev.parent, &freq, flags); - if (err) + if (err) { + freqs.new = cur_freq; + devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE); return err; + } freqs.new = freq; devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE);