[COMMON] samsung: exynos-dm: fix frequency policy condition
authorTaekki Kim <taekki.kim@samsung.com>
Tue, 13 Sep 2016 07:27:24 +0000 (16:27 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:26:05 +0000 (17:26 +0900)
Change-Id: Ic997d8c9967a899aea29e906074397fa3e2706e9
Signed-off-by: Taekki Kim <taekki.kim@samsung.com>
drivers/soc/samsung/exynos-dm.c

index 6bcdf0ee0541555bd982232fac3fd15e4a13aa29..44e85003546bdd192e848eb05f27e33185176b19 100644 (file)
@@ -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;
        }