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: 10597073 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 7B77914DB for ; Wed, 12 Sep 2018 08:31:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AB54298C5 for ; Wed, 12 Sep 2018 08:31:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F17729976; Wed, 12 Sep 2018 08:31:01 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 074FA298C5 for ; Wed, 12 Sep 2018 08:31:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727843AbeILNdS (ORCPT ); Wed, 12 Sep 2018 09:33:18 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:33827 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726502AbeILNdR (ORCPT ); Wed, 12 Sep 2018 09:33:17 -0400 Received: by mail-pg1-f194.google.com with SMTP id d19-v6so681365pgv.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=j1BPanYKhk8xjjNjr0bGkbuzc8hTkZ/DtEHMusCEwXXDAC4myhqBfUytDtYr2Oxs52 e7JSIgjHM5XAwdyGllzYVm+ZqE65wbyuyuFlRky+eJq7Vf2ZnFTKo1F3hnVx+drGw/Ch IRDsWyr+ARke+bgJfxaU6JXK54JJB44HIlTxsbSjx3yIlPMKNsFoF4/htU7asQt24Bfm BKU5kh4YXBeLZhErtMv5G0fMjyXZ7Q5koAMOO68TxumTSEoqDCC9ScMzmVuoUbHvZ0d+ QY+gYsJ5oJwtCCgojtPw8Yu1bpp+2FLNg7kuCc1FWvZOqinluRaqG/HBfQjXf58YWSyx ooHA== X-Gm-Message-State: APzg51Cvq21FM313i1S94v5HpVnZexTW8PwagBT6bTVu3scUAlE8p7mu KICEUkwPjJF4s7b4QiuirtrnNQ== X-Google-Smtp-Source: ANB0VdZ5el16nuRa+e+C7BsVjl5vQFzn5pedoQH+9aEybk2dPMbmWqxNp7KnVLs2I95oz8ir2kyl9Q== 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-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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; }