lkml.org 
[lkml]   [2017]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 6/8] PM / devfreq: Remove unneeded conditional statement
    Date
    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>
    ---
    drivers/devfreq/devfreq.c | 7 +++----
    1 file changed, 3 insertions(+), 4 deletions(-)

    diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
    index 534ead60d1cc..191d4de7bd87 100644
    --- a/drivers/devfreq/devfreq.c
    +++ b/drivers/devfreq/devfreq.c
    @@ -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;
    --
    1.9.1
    \
     
     \ /
      Last update: 2017-10-13 09:50    [W:4.916 / U:0.768 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site