Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752395AbdIUAf3 (ORCPT ); Wed, 20 Sep 2017 20:35:29 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:40373 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbdIUAd6 (ORCPT ); Wed, 20 Sep 2017 20:33:58 -0400 X-AuditID: b6c32a38-f799e6d000004f48-c3-59c308f4e12a From: Chanwoo Choi To: myungjoo.ham@samsung.com, kyungmin.park@samsung.com, cw00.choi@samsung.com Cc: rafael.j.wysocki@intel.com, chanwoo@kernel.org, inki.dae@samsung.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 6/8] PM / devfreq: Remove unneeded conditional statement Date: Thu, 21 Sep 2017 09:33:50 +0900 Message-id: <1505954032-3327-7-git-send-email-cw00.choi@samsung.com> X-Mailer: git-send-email 1.8.0 In-reply-to: <1505954032-3327-1-git-send-email-cw00.choi@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrCKsWRmVeSWpSXmKPExsWy7bCmvu4XjsORBjN6DC0m3rjCYnH9y3NW i0n3J7BYnG16w25xedccNovPvUcYLW43rmCzeLziLbsDh8fiPS+ZPDat6mTz6NuyitHj8ya5 AJaoVJuM1MSU1CKF1Lzk/JTMvHRbJe/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wcoDOU FMoSc0qBQgGJxcVK+nY2RfmlJakKGfnFJbZK0YaGRnqGBuZ6RkZGeibGsVZGpkAlCakZ9zee ZynYzVGxcqZwA+MU9i5GTg4JAROJq9/nMUHYYhIX7q1n62Lk4hAS2MEosf/JVCjnO6PEidN9 cB19L2exQyR2M0psWP0brF1I4AejxKUNgSA2m4CWxP4XN9hAbBGBAInOtavAapgFmhglpi5z ALGFBbwlru45BhZnEVCVOPr4GSuIzSvgIrHhVSfUSXISH/Y8AlvMKeAq8e1sF9hFEgIdbBIN dydCXeQ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H5lcYVPS0VdQZLb7x/dTiv9Gr27JOP VsQYzGRkjBP0YjN1mKY26WWQTeL1krh22dbyop/RL/1FHnu1pd39aGkR5nK+cPLbp0l33PP2 ybkURE+rmbhLXLulVtQio+zn2ZTDGfVXb0b8NE3n2msll/JUiaU4I9FQi7moOBEAQKlUOR8C AAA= X-CMS-MailID: 20170921003356epcas1p246204a12c12e4c9ed94771dc25ce143d X-Msg-Generator: CA X-Sender-IP: 182.195.42.142 X-Local-Sender: =?UTF-8?B?7LWc7LCs7JqwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?Q2hhbndvbyBDaG9pG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTZW5pb3IgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170921003356epcas1p246204a12c12e4c9ed94771dc25ce143d X-RootMTR: 20170921003356epcas1p246204a12c12e4c9ed94771dc25ce143d References: <1505954032-3327-1-git-send-email-cw00.choi@samsung.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1051 Lines: 30 The commit 0ec09ac2cebe9 ("PM / devfreq: Set the freq_table of devfreq device") initializes the freq_table array of each devfreq device always. In result, it is unneeded to check whether profile->freq_table is NULL or not. Signed-off-by: Chanwoo Choi --- 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 3b9662ffe603..b28810cae7ee 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -315,10 +315,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