From patchwork Wed Sep 19 22:20:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10606633 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 D5E0A14BD for ; Wed, 19 Sep 2018 22:21:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C64342C9BC for ; Wed, 19 Sep 2018 22:21:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B86112CC9A; Wed, 19 Sep 2018 22:21:48 +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 6DDE12C9BC for ; Wed, 19 Sep 2018 22:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726013AbeITEAp (ORCPT ); Thu, 20 Sep 2018 00:00:45 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:34450 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726003AbeITEAp (ORCPT ); Thu, 20 Sep 2018 00:00:45 -0400 Received: by mail-pf1-f193.google.com with SMTP id k19-v6so3357857pfi.1 for ; Wed, 19 Sep 2018 15:20:44 -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 :in-reply-to:references; bh=/7A+jgDIUZCGxGLhoGYTieLMUMpj5eaMcqaxJhDr4YA=; b=BXitjeAafq8N0RjL/QUGy9m5AifOy3d1uuIkG/hOfeQrnNf1WzTljTy2lUbyaBJPfO KWqpu6n98jyuWmA6R4w0PI0OnZNlmgjAe6EbRFKFcFfc9UYON/AX0QI+KcTeF2k123a9 dNbuUEn9RMaKtaFqrXV+FqWr/1kr/Im2EfI5Q= 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:in-reply-to:references; bh=/7A+jgDIUZCGxGLhoGYTieLMUMpj5eaMcqaxJhDr4YA=; b=F4RL7wMsUCvp41Fuaw2G3qKCKYdgpOZQEsvoEfuO8sIC3Ck/Y9dgA1ztktAk6c3YH4 bAd00yCenKEsspbtiU8gWDYW+A4jyOnPCENJZ9kmBkujofLrXcJhF4d+JL4bxb9HlzsT pSPASXo9j2yWMdYIlZYnSI+fXO02Cxhvr9sAp2V9m4rfH2C3+JNv66yZKp+LkiRw1+BY Lecs9m+8d1IIAi93+4js3+3Nzg5m3XfH4AYNo1abm/Y7Ht+G/oVOCnAEd8espeXbXb53 6nih2pG/RsYBH9TeQ5Tg+5nUEw3CrR93Ns6T5m0rf0HTPZlgXIMnHHSadjF5pFmiQqBx z/Bg== X-Gm-Message-State: APzg51ATkQsst85S7T6zR0/4IBPmBRb2y1Z4yysNy9QIuOKiaTuJ8l8n 17i86lFsAlZKyyKhx4s0sRgjTg== X-Google-Smtp-Source: ANB0VdYoOb/IDfKIIbejCcQMN92UlhOUzEVXI/WLLAFIsZoi93FrFweNXjnxTo7Y0Njtsls2q1pGhw== X-Received: by 2002:a65:5284:: with SMTP id y4-v6mr32790902pgp.283.1537395644376; Wed, 19 Sep 2018 15:20:44 -0700 (PDT) Received: from localhost ([209.121.128.187]) by smtp.gmail.com with ESMTPSA id f13-v6sm21489306pgq.63.2018.09.19.15.20.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Sep 2018 15:20:43 -0700 (PDT) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd Cc: Viresh Kumar , Rafael Wysocki , linux-pm@vger.kernel.org, Vincent Guittot , "4 . 18" , Niklas Cassel , linux-kernel@vger.kernel.org Subject: [PATCH V2 01/12] OPP: Free OPP table properly on performance state irregularities Date: Wed, 19 Sep 2018 15:20:20 -0700 Message-Id: <2fbb8670b4ff4454f1c0de510f788d737edc4b90.1537394233.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: 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") Tested-by: Niklas Cassel 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; }