PM / devfreq: Remove unneeded conditional statement
authorChanwoo Choi <cw00.choi@samsung.com>
Mon, 23 Oct 2017 01:32:11 +0000 (10:32 +0900)
committerJunghoon Kim <jhoon20.kim@samsung.com>
Thu, 14 Feb 2019 05:56:41 +0000 (14:56 +0900)
The freq_table array of each devfreq device is always not NULL.
In result, it is unneeded to check whether profile->freq_table
is NULL or not.

Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/devfreq.c

index 056e908..fe2af6a 100644 (file)
@@ -311,10 +311,9 @@ int update_devfreq(struct devfreq *devfreq)
        freqs.new = freq;
        devfreq_notify_transition(devfreq, &freqs, DEVFREQ_POSTCHANGE);
 
-       if (devfreq->profile->freq_table)
-               if (devfreq_update_status(devfreq, freq))
-                       dev_err(&devfreq->dev,
-                               "Couldn't update frequency transition information.\n");
+       if (devfreq_update_status(devfreq, freq))
+               dev_err(&devfreq->dev,
+                       "Couldn't update frequency transition information.\n");
 
        devfreq->previous_freq = freq;
        return err;