Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp705276pxa; Thu, 27 Aug 2020 13:30:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOJxyXs77tOdaPuUwjYy67zl69NmXFNvMbhGYu6XUx6mani/Kf278ktnAtbC7qmHIPfcKe X-Received: by 2002:a05:6402:1f6:: with SMTP id i22mr20840504edy.374.1598560250115; Thu, 27 Aug 2020 13:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598560250; cv=none; d=google.com; s=arc-20160816; b=M/3mB0bDp/6wT1lYDo17FwzizBEtOtbHR1voYryd0J89K0ifqncYuclrgGJ7VIUdJh Ahzi5EqPQLYYpGCLnubq1BaZUwwHJ2BKFL9TxImxKRuP+tcrr0qSnKS336mx/iutHmhF qfyLh5lRdNpGo1ZTFIeTF6/j84f9lhiRZZijZlq6ETUbQaO2fKJj+Ro1Ib/wyhTgIcQq Lln252jlKVYC7ZOonWy5FVI2DDHC0ShowsUgyZRPGey0+BM7MVlTpHGkchJ50GF/MjQO 1l8+YHWaiq9pXGbRq3zPObUaaquTiW8X94qhG/ddQX0OCBW20lQzUob/PWwBiE4NX7YO 0+aA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pZ//jLyEGc9rQ/5ywgZs9AFGiQ4M3Jn6N3wi0W6fLTk=; b=rcXO9mcIRdNF+E9+lijq+22t/tKxAYKUSXKSHNJP8J+4fauEcRj9pG1YP3cBveTSD5 drjyf6+B9fhBHU94/ODWVOhWThkSJhA3LM/sNx1YvBN8G2foJN3PXUaWJO7WeH8PjZJD HDEidwgZr42mrV2DjXERh3DdEOf5Mgtzcinx3KOT5p4zUyWWFtw5nztWkK+S1uNlihA9 o1pI9ICrAxJaim2rF/jy6rAl2uuBQjiZzVKxUxvpamLxyr5ue9T7l9Ol8Dh5bhTz2pEv DClI++K2wv55KHvAZQE5AqCssFM9d6XsxS98idslkHLtBWnrUr6fV7V9e7Y4RyokxkqU s+Dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cW9R1YXa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id u22si2101353edy.546.2020.08.27.13.30.26; Thu, 27 Aug 2020 13:30:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cW9R1YXa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726322AbgH0U1j (ORCPT + 99 others); Thu, 27 Aug 2020 16:27:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726147AbgH0U1i (ORCPT ); Thu, 27 Aug 2020 16:27:38 -0400 Received: from mail-ua1-x941.google.com (mail-ua1-x941.google.com [IPv6:2607:f8b0:4864:20::941]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D16EC061264 for ; Thu, 27 Aug 2020 13:27:38 -0700 (PDT) Received: by mail-ua1-x941.google.com with SMTP id e41so591457uad.6 for ; Thu, 27 Aug 2020 13:27:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pZ//jLyEGc9rQ/5ywgZs9AFGiQ4M3Jn6N3wi0W6fLTk=; b=cW9R1YXaVzPIgb19g8eHR8EByOO083Db4fVQIjH2ZM5PSNpYKloAXezTr/CP2u/mQA fvI9or4iuYtkKnYTQoORu5kv3YBwvSNmt9ZZYuPrUupI2TegHbXdJTPo5YypvYmxp8hx rJiqqxwpyyyZkCI0eAxr5m+KSQX1SjZBLpCz35ERVmRV7XMyrHFdzaY/PyiEvIVAq5X9 hHQWjx4uhvCQ09u5QjwypG+jFOEFmJfRes61/kzhSe4xTo/Jk9QDPScuRoskWUDeWlXC 2rn4iNmGYiWNVazbSXBBgM/hv6Lc0RAc09bPUmSAdDsk4LD33n2Castf2l92TfPyELj5 77Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pZ//jLyEGc9rQ/5ywgZs9AFGiQ4M3Jn6N3wi0W6fLTk=; b=WHleCEA7sAe/D5c43Oi3wBeLZByyaAHT2+u7NgFLSYMQ4YbRU8zZVQ184x+6T1RkPH FQhK5OfXX+hHB/YXF0Za7NMe9s7AlM9fWIZlb4HKghLIWynMLHpuM8UqaahAr6jWdwdM P8BCnS/HyQLtXb9Ies+Tm5v+GjUqUXl3ZhPqYUb2pcN2Jw3qJpwlXbmcGIdUEUjf2DCC 7xlJIYBJzq2eocJ6whZrUAC/XiLFS+LpN3aeBiDf6RXvIrpK/+kNKn68avsgYT6NoRqH YaUGMpm4aMnyDJ3dNKtfWKXK4VXG+//TVjP/E6QtypPpQIFprZTlsCeJk6XwTOCIOr2x IIuA== X-Gm-Message-State: AOAM531kCT1Pb72or7L6+YhfSyMGiFf9hWg+U1ADtlY9RgnE8DRm35Hu lxkpO2+Q3LJ6tJFShzQsRCIE2/BY9+y7q2xniy07vw== X-Received: by 2002:ab0:142e:: with SMTP id b43mr14014891uae.7.1598560057400; Thu, 27 Aug 2020 13:27:37 -0700 (PDT) MIME-Version: 1.0 References: <20200827083330.1.I669bb4dc3d92bd04e9a695f97904797dc8241b79@changeid> In-Reply-To: <20200827083330.1.I669bb4dc3d92bd04e9a695f97904797dc8241b79@changeid> From: Naresh Kamboju Date: Fri, 28 Aug 2020 01:57:25 +0530 Message-ID: Subject: Re: [PATCH] mmc: sdhci-msm: When dev_pm_opp_of_add_table() returns 0 it's not an error To: Douglas Anderson Cc: Ulf Hansson , Arnd Bergmann , vbadigan@codeaurora.org, Rajendra Nayak , Adrian Hunter , Andy Gross , Bjorn Andersson , Viresh Kumar , linux-arm-msm , open list , linux-mmc Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Aug 2020 at 21:03, Douglas Anderson wrote: > > The commit d05a7238fe1c ("mmc: sdhci-msm: Unconditionally call > dev_pm_opp_of_remove_table()") works fine in the case where there is > no OPP table. However, if there is an OPP table then > dev_pm_opp_of_add_table() will return 0. Since 0 != -ENODEV then the > "if (ret != -ENODEV)" will evaluate to true and we'll fall into the > error case. Oops. > > Let's fix this. > > Fixes: d05a7238fe1c ("mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()") > Signed-off-by: Douglas Anderson Reported-by: Naresh Kamboju I will test this patch and report again on this email thread. > --- > > drivers/mmc/host/sdhci-msm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c > index b7e47107a31a..55101dba42bd 100644 > --- a/drivers/mmc/host/sdhci-msm.c > +++ b/drivers/mmc/host/sdhci-msm.c > @@ -2284,7 +2284,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) > > /* OPP table is optional */ > ret = dev_pm_opp_of_add_table(&pdev->dev); > - if (ret != -ENODEV) { > + if (ret && ret != -ENODEV) { > dev_err(&pdev->dev, "Invalid OPP table in Device tree\n"); > goto opp_cleanup; > } > -- > 2.28.0.297.g1956fa8f8d-goog > - Naresh