Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5139467imm; Wed, 12 Sep 2018 01:31:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZr6BgQS/k4koJQ14rwnUSiDev6i2QgM2WBHehGOVvdqG/S19SLxSe5qy/wGCyo9sJlqL8I X-Received: by 2002:a63:d74f:: with SMTP id w15-v6mr913383pgi.306.1536741097598; Wed, 12 Sep 2018 01:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536741097; cv=none; d=google.com; s=arc-20160816; b=NxFFMzh9NXr2zdl9gumpfMSbm0lWpzgwxM2rDTEY/fnejOlrsFE+VgAUjwWbjkG4hp BGd2LaTEfUfR7N6AeUK4hLpDZs/hCcEBoWBLbgWwTeLG8NKtedEn7F1+yi+3Y0R5WR3D ETzmJKLXqdvT5VPA2D+xD1aWbPs+UU4AolCSr9JnzXQnDiZvpcuqiuIM6eIWhJKWmNNQ jYlogXoc4323c6hoESt2zFNLMiw6drGOGnwgtk4uo2PxRvajBcZTk4OiHjMBpMI/5DnD aW99B9/oxrwNH7TB4D9gzc7CCmfvHW5yA7sRuGRcKFGzM03l3GImhPTI3uM5D99QMiKx tvcw== 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=EoaMgyRKGrTjWC81uFhAnDIHZcUTsI8cbnqtOpUA8v/+SbgtlmpEangFnHQIJ4wfai HoEzxYFpcHLS9/pr0kho2sB7Su56Q1ZvAw0tUlmzCht5CTtYUjqT1M78yAh6njQibcVM TV25n2Or6CleR8EoRwcXInyQd4uBsa0DzeoYDY95grttU3PJtRagxHHcRgY9FtJTP1qg PBQF5CBDKK+NWP38/InuF/sCEeJLbacGeL8Hl4XDPH3CTpHjD1WhPNE5D8yaBUEMgLQ/ zDGmIQPDlOezq9IunL7R8iG/vx1eIMtvvfYGjabR1sjXSmAJZhAiNSIO1lXNARNenuJf KrTg== 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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 x5-v6si336537plv.304.2018.09.12.01.31.22; Wed, 12 Sep 2018 01:31:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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 linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727872AbeILNdS (ORCPT + 99 others); Wed, 12 Sep 2018 09:33:18 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:33841 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725948AbeILNdR (ORCPT ); Wed, 12 Sep 2018 09:33:17 -0400 Received: by mail-pf1-f194.google.com with SMTP id k19-v6so662431pfi.1 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=tithDDpnzEHax1pXlniO38MK0lh0BokTE1mqSWZ82HUIjNa4aZbaCQH24HrFQTAiyK cCVBJbKcXpFI9ArOlQX0Deg4C/NY8yVGjrC8vp6vKZwqjacMtNYUgDpD1fND1GCnCh0A DQCY2bIDjr4dD11cpADmY74UX+MJon2eJglJeYZZ5Jx65KwZveh3kVAVtoKHbYamDNDd 1Q43g7yN8rKM8rKqgLJfOGt+F77YaWJJBYD2eAj5NkLi30OEUg7yu6Fbk6//to9ZUpWp QipW26M37yoILfejek8+NT40fjNS5n8LUumgto5IQsLmMULKTmu51uEP7BURUqXvQrow GEiA== X-Gm-Message-State: APzg51C1KWkrQqeZCiifSvtHiEphxKb18EOKthxvYdltBwfv2JKFQ1Wf 1yQsTVkXeprwAzILpnSTMVlrBg== 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(+) 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; } -- 2.18.0.rc1.242.g61856ae69a2c