From patchwork Wed Sep 12 08:28:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 146512 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4546711ljw; Wed, 12 Sep 2018 01:29:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZC++SNggFqoWYC8jF3u4VwiMYxmVzUzjSMLF/Dw7E2ru6BQwFu15CZ4Es/w7bUZWSCiGla X-Received: by 2002:a62:7046:: with SMTP id l67-v6mr944180pfc.84.1536740992915; Wed, 12 Sep 2018 01:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536740992; cv=none; d=google.com; s=arc-20160816; b=cKBq/npZTPlNouEXOIidZRbHLGrKJTw3RJ5RF8Wu6+wSo1SqxfI/kl4SQty4vtjdM6 5xSyLoDG7FM/dsBCb4kfN8Y982Bg7SEL89Xpqza3o/kKDiKitGkkr5d2qZ2+5cVcmN5W R26yUrf+YnAH9r5S9Rj6wBIrjCChTeHWiksE93zHq/jWQ8DpCzSBlwiC7BZ3h+/00xD8 DSPYKcRdUwJbgJO8eWCm/ZfybHVTStt0qiMCk+KqpqSNCCC/ZQ2605LW/ksUxN4FDzTq NyitrW8Dm4wDi2Xtznc/OpkyC9dwlxgy7p6RNwcTprYVuOtAEbLDGGwqIfWfabk41/9k OLsg== 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:dkim-signature; bh=uUI5Y3mekTjxrtv6ALknOR0cOq3hMnDP+U5fQNkXcFc=; b=BIDTMYxglLVhf9v1g+3ZK0Dg+Hu/n/0/j8ldawOhMvsE98R5MZ0CRc/MCcsKdi7d5s hFyaAuEXuxjvcCLUJENEUhNnYAEblEZa5vnKeOko7GT7vBER0P5iMuQ5i40KlFzMwVwX vPXqMBAWTN5D+R23Yhd7xRWveFNsqJEVX6vb9hJgkD8fMW+gqVd95q9dd6tQtjZjd/e0 fzJjkf4ZahEA9+mSjwuKs4as8lresUZgrvxNm5HQ5mAZXpTOE5PW7OVaMcQ1zKuHlIiz LZT8L5c0B64hODjLSPxQQpriCjKSppeV32ZKK3+K9Uk9vP/PYsgjb4Plh50ECXTwG43M 82VA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kwj+Zh/f"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n11-v6si310462pgr.467.2018.09.12.01.29.52; Wed, 12 Sep 2018 01:29:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="kwj+Zh/f"; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725948AbeILNdS (ORCPT + 13 others); Wed, 12 Sep 2018 09:33:18 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:45426 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726552AbeILNdR (ORCPT ); Wed, 12 Sep 2018 09:33:17 -0400 Received: by mail-pg1-f196.google.com with SMTP id x26-v6so654584pge.12 for ; Wed, 12 Sep 2018 01:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uUI5Y3mekTjxrtv6ALknOR0cOq3hMnDP+U5fQNkXcFc=; b=kwj+Zh/fU6acby92dexeKGSe9U2V665kaeTu0q0NJEsEGh77+8KwgM+XVljNEBiztX /N6wopayxojgsKkY/Rp9kcXiYJkzLWHrd44ikCtCUgnhADXuraNAL1THTG1JROrmcrTY cHUGgiqqNQXYebZ5M0iV/DOypWhgIgPXQzxUQ= 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:in-reply-to :references; bh=uUI5Y3mekTjxrtv6ALknOR0cOq3hMnDP+U5fQNkXcFc=; b=HvVXzxEyuUL1pC3L2REccL0opze6VNXyk+cWBNTcMOlHtZGWLIGqtg61SXULSt2ZDe oYErlG9wAyxFNvoapUjB6vAOtCbK7ZZR++MB3wuagog/qzQIPmkgEjfg+tb1fiQp+AgO bK70I/6p4XQF2MST0NGeMm39V6mWJQ1JKrO1hCd+0aTCDIjTKSWPrpff9+0NPYHvjCZA p32uWoIUPNjeXPrDaMI+dcd5JJCUlW7DI/BHUDOQUWHvUI4saS1wnSrn0j7QkH/RZB9Z kHgwtZvWq32qeKggOnCeGPiHzCK9fhY2yJteku4wY3HGrivBIkdQXhlLViAhhfD03FxO emGA== X-Gm-Message-State: APzg51B5L5dSopDkdK66qkhtfBDApyEBoc7CE4IgBL4/IbaEce8l2iZu rLSd7BTZ7l5hx6WJUGd7yxtPEg== X-Received: by 2002:a65:6292:: with SMTP id f18-v6mr877898pgv.85.1536740989727; Wed, 12 Sep 2018 01:29:49 -0700 (PDT) Received: from localhost ([122.171.64.45]) by smtp.gmail.com with ESMTPSA id s75-v6sm772624pfd.108.2018.09.12.01.29.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 01:29:49 -0700 (PDT) From: Viresh Kumar To: niklas.cassel@linaro.org, Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , Rafael Wysocki , linux-pm@vger.kernel.org, Vincent Guittot , "4 . 18" , linux-kernel@vger.kernel.org Subject: [PATCH 01/11] OPP: Free OPP table properly on performance state irregularities Date: Wed, 12 Sep 2018 13:58:40 +0530 Message-Id: <14486fb4c32047983ace6af4f4ffe2366242f3b5.1536736872.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.18.0.rc1.242.g61856ae69a2c In-Reply-To: References: Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The OPP table was freed, but not the individual OPPs which is done from _dev_pm_opp_remove_table(). Fix it by calling _dev_pm_opp_remove_table() as well. Cc: 4.18 # v4.18 Fixes: 3ba98324e81a ("PM / OPP: Get performance state using genpd helper") Signed-off-by: Viresh Kumar --- drivers/opp/of.c | 1 + 1 file changed, 1 insertion(+) -- 2.18.0.rc1.242.g61856ae69a2c diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 7af0ddec936b..20988c426650 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -425,6 +425,7 @@ static int _of_add_opp_table_v2(struct device *dev, struct device_node *opp_np) dev_err(dev, "Not all nodes have performance state set (%d: %d)\n", count, pstate_count); ret = -ENOENT; + _dev_pm_opp_remove_table(opp_table, dev, false); goto put_opp_table; }