From aa425e394bbfd5461c98656ac8e9631610261efc Mon Sep 17 00:00:00 2001 From: Taekki Kim Date: Tue, 13 Sep 2016 16:27:24 +0900 Subject: [PATCH] [COMMON] samsung: exynos-dm: fix frequency policy condition Change-Id: Ic997d8c9967a899aea29e906074397fa3e2706e9 Signed-off-by: Taekki Kim --- drivers/soc/samsung/exynos-dm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index 6bcdf0ee0541..44e85003546b 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -754,11 +754,11 @@ int DM_CALL(enum exynos_dm_type dm_type, unsigned long *target_freq) return -EAGAIN; } - if (*target_freq >= dm->min_freq && *target_freq < dm->max_freq) - dm->target_freq = *target_freq; - if (*target_freq < dm->min_freq) + dm->target_freq = *target_freq; + + if (dm->target_freq < dm->min_freq) dm->target_freq = dm->min_freq; - if (*target_freq >= dm->max_freq) { + if (dm->target_freq >= dm->max_freq) { dm->target_freq = dm->max_freq; relation = EXYNOS_DM_RELATION_H; } -- 2.20.1