From: Chanwoo Choi Date: Mon, 23 Oct 2017 01:32:11 +0000 (+0900) Subject: PM / devfreq: Remove unneeded conditional statement X-Git-Tag: v4.15-rc1~145^2^2^2~1 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ccc4c3bcbb7de3cb61723f7584c01c3bde6cfbbb;p=users%2Fhch%2Fmisc.git PM / devfreq: Remove unneeded conditional statement 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 Signed-off-by: MyungJoo Ham --- diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 381f92e5e794..78fb496ecb4e 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;