From: Taekki Kim Date: Tue, 13 Sep 2016 07:27:24 +0000 (+0900) Subject: [COMMON] samsung: exynos-dm: fix frequency policy condition X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa425e394bbfd5461c98656ac8e9631610261efc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] samsung: exynos-dm: fix frequency policy condition Change-Id: Ic997d8c9967a899aea29e906074397fa3e2706e9 Signed-off-by: Taekki Kim --- 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; }