From patchwork Mon Jan 7 06:58:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10750027 X-Patchwork-Delegate: rjw@sisk.pl Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C1936746 for ; Mon, 7 Jan 2019 06:59:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD66F28987 for ; Mon, 7 Jan 2019 06:59:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9AB7E28989; Mon, 7 Jan 2019 06:59:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F38128987 for ; Mon, 7 Jan 2019 06:59:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726427AbfAGG7B (ORCPT ); Mon, 7 Jan 2019 01:59:01 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:43404 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725777AbfAGG7B (ORCPT ); Mon, 7 Jan 2019 01:59:01 -0500 Received: by mail-pf1-f196.google.com with SMTP id w73so21366421pfk.10 for ; Sun, 06 Jan 2019 22:59:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aPcQQ3g+VFcLyuhwjnxAyzEpHmVwskJ1oHM3n1Kx1ls=; b=KxlJt7VQvW8gSUxmmibJiBl+6oBaF5cV7NHkopfC7jQgfmUlPcQ4xmPvePXaoTjNW1 WiHIIYt6/bt7UWZEEyBIWmxbiya1mYyoLde1avWUX+gMPvFSSUbOXZAYmAmN1j19Ecif sLj1lT/Ondkx2oziZ2PnlligrZW7o9UQzrlk8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=aPcQQ3g+VFcLyuhwjnxAyzEpHmVwskJ1oHM3n1Kx1ls=; b=Lsu49Sg4y5sjPdoetz9alqPjZNnPypaPjAmugRT+9Wii6xQ0RZeYApP/yyddXsba5W eNDaeMeYH5dxj1WwZsqXHRTwlpqOIm/3TId1bQPGtmVUu0e3Bq6CcFHO8WPepNv+/cUb IFNKTwOFoWamxvagtkKAefPaxx3U9ou4Vbcmk5lLQq2464hNgOsBz73oXCbomJfKLDad lpsMTv+9gn9cCfIkbf4d1gTgRfbJuY5QJib1+x3lGv752D5MwBPXHihFlIgQpIvUPMam Bkxne3jg5HMEHyo34l3ddPUwz699ht7yglLtFZ9rRpBO2HdIHLUXL4fwfUVmkD95lcSc Oicw== X-Gm-Message-State: AJcUukcEgWbJoQHmv2SrZdLtdWOmXCHJJtTnitmCUQMv0aqHYvgQcyuw uweWASECi3ur4I5FUjejJarQtw== X-Google-Smtp-Source: ALg8bN7P7n+53nMd07uwhlI+CcnkCohOY1YCqjcQHQHrRcFeMSQD/jFFPzCkUOdc12ADAt/Q0UCxYA== X-Received: by 2002:a63:f615:: with SMTP id m21mr10174823pgh.428.1546844340557; Sun, 06 Jan 2019 22:59:00 -0800 (PST) Received: from localhost ([122.166.131.155]) by smtp.gmail.com with ESMTPSA id h129sm117827620pfb.110.2019.01.06.22.58.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jan 2019 22:58:59 -0800 (PST) From: Viresh Kumar To: Rafael Wysocki Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , linux-kernel@vger.kernel.org Subject: [PATCH] cpufreq: Don't update new_policy on failures Date: Mon, 7 Jan 2019 12:28:54 +0530 Message-Id: X-Mailer: git-send-email 2.19.1.568.g152ad8e3369a MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The local variable "new_policy" isn't getting used in the error path since the commit f9f41e3ef99a ("cpufreq: Remove policy create/remove notifiers"). Don't update it in error path. Signed-off-by: Viresh Kumar --- drivers/cpufreq/cpufreq.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 7aa3dcad2175..9a5f82ef40e8 100644 --- a/drivers/cpufreq/cpufreq.c +++ b/drivers/cpufreq/cpufreq.c @@ -1305,8 +1305,6 @@ static int cpufreq_online(unsigned int cpu) if (ret) { pr_err("%s: Failed to initialize policy for cpu: %d (%d)\n", __func__, cpu, ret); - /* cpufreq_policy_free() will notify based on this */ - new_policy = false; goto out_destroy_policy; }