From patchwork Mon Jan 22 14:41:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 125427 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1191008ljf; Mon, 22 Jan 2018 06:41:18 -0800 (PST) X-Google-Smtp-Source: AH8x225QpuTcD5nzpN4Bx2EAlyB9dO1MNzvz8IC3ZbkOjsvwKfWmAk34xC5peVQXmR2qAe0Wusit X-Received: by 2002:a17:902:9348:: with SMTP id g8-v6mr3703853plp.102.1516632078358; Mon, 22 Jan 2018 06:41:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516632078; cv=none; d=google.com; s=arc-20160816; b=U4xHtpYdi6JjXpZcdd5OGEDKIE8ITFxb2sSMRV8Dd3eYLJ35YZtD6zKdFxgPtFXdU+ p8weZYRZQ71ypwyQPMrbVqJ2ugIdTO3aq3j41JVk/oCMU01dFRF/9GX3ccKZWOZhsuvd MggzmcQ28blX2r+43BbGDCpQl4Av8yefSKYEhy0pG1BwquEmUQgjRQNK/f/FwuYPPHkt S9tENqTL71rkfJ1Wlevqnb+QznDcMEjBuda5ARvpAtrB1sqYuysr23C63xvKWtttfnzy F6uq++SAV0mpnlEl2JOh50Dfn0tZ5kSoFYxn+F16FNAEPVrqh9cxCprNa+4OwqVFmTEz Nw2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=+5HsX3LQCMljv7yBu+Mao6neiYQhyTkRsy1hEDdz22o=; b=uFHWJBbsU8Cux/tJELUNDirGh86MPKiJmQr0HEixxdqtnA70JQgvHl48XKdIHaFwwU y7DD8aw0h+46UAKAxHFPBijGVRzaIxKEw/dE4CpFHb7l7gEHrkxgK9j6sloZAzsBL2gc a1CH6WoYnsdunsp+Pzpqo27JCdk0T744qPMK2jVLXx2ZtnMf3H2+ldwdwnFZ1ezb2SZG wXj7A9jVCCvH3dtS1VyKiG6ppFL7rR2J0lW1Vh3thiuKOuoTzyY32d6qwGfu0NrveIDz PKCLVKhqwKGkFJ/AAXE6wiQuOm5dAX5ZviQUm/UQnfCRy2jJjTJ3uCK/mio5Zc4XfLZp DDcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n59-v6si3579736plb.13.2018.01.22.06.41.18; Mon, 22 Jan 2018 06:41:18 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750997AbeAVOlR (ORCPT + 11 others); Mon, 22 Jan 2018 09:41:17 -0500 Received: from foss.arm.com ([217.140.101.70]:59676 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750828AbeAVOlQ (ORCPT ); Mon, 22 Jan 2018 09:41:16 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9B4C41529; Mon, 22 Jan 2018 06:41:16 -0800 (PST) Received: from e107155-lin.cambridge.arm.com (unknown [10.1.210.28]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B050A3F41F; Mon, 22 Jan 2018 06:41:15 -0800 (PST) From: Sudeep Holla To: linux-pm@vger.kernel.org Cc: Sudeep Holla , "Rafael J . Wysocki" , Viresh Kumar Subject: [PATCH] cpufreq: scpi: fix static checker warning cdev isn't an ERR_PTR Date: Mon, 22 Jan 2018 14:41:07 +0000 Message-Id: <1516632067-9584-1-git-send-email-sudeep.holla@arm.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20180122104823.GA25283@mwanda> References: <20180122104823.GA25283@mwanda> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Commit 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency") leads to the following static checker warning: drivers/cpufreq/scpi-cpufreq.c:203 scpi_cpufreq_ready() warn: 'cdev' isn't an ERR_PTR of_cpufreq_cooling_register() returns NULL on error. This patch removes the incorrect IS_ERR check on the returned pointer. Fixes: 343a8d17fa8d ("cpufreq: scpi: remove arm_big_little dependency") Reported-by: Dan Carpenter Cc: Rafael J. Wysocki Cc: Viresh Kumar Signed-off-by: Sudeep Holla --- drivers/cpufreq/scpi-cpufreq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.7.4 Acked-by: Viresh Kumar diff --git a/drivers/cpufreq/scpi-cpufreq.c b/drivers/cpufreq/scpi-cpufreq.c index 247fcbfa4cb5..efe32cbefa06 100644 --- a/drivers/cpufreq/scpi-cpufreq.c +++ b/drivers/cpufreq/scpi-cpufreq.c @@ -197,11 +197,8 @@ static int scpi_cpufreq_exit(struct cpufreq_policy *policy) static void scpi_cpufreq_ready(struct cpufreq_policy *policy) { struct scpi_data *priv = policy->driver_data; - struct thermal_cooling_device *cdev; - cdev = of_cpufreq_cooling_register(policy); - if (!IS_ERR(cdev)) - priv->cdev = cdev; + priv->cdev = of_cpufreq_cooling_register(policy); } static struct cpufreq_driver scpi_cpufreq_driver = {