[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPDyKFpt+8GF9K1evMJwPQ-hwsSOiC2GQkNTFER2axw5AF+fHg@mail.gmail.com>
Date: Fri, 28 Aug 2020 10:43:44 +0200
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Viresh Kumar <viresh.kumar@...aro.org>,
Douglas Anderson <dianders@...omium.org>,
Naresh Kamboju <naresh.kamboju@...aro.org>
Cc: Arnd Bergmann <arnd@...db.de>,
Veerabhadrarao Badiganti <vbadigan@...eaurora.org>,
Rajendra Nayak <rnayak@...eaurora.org>,
Adrian Hunter <adrian.hunter@...el.com>,
Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
linux-arm-msm <linux-arm-msm@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
"linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH] mmc: sdhci-msm: When dev_pm_opp_of_add_table() returns 0
it's not an error
On Fri, 28 Aug 2020 at 07:09, Viresh Kumar <viresh.kumar@...aro.org> wrote:
>
> On 27-08-20, 08:33, 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 <dianders@...omium.org>
> > ---
> >
> > 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;
> > }
>
> Wow!
>
> How many bugs did I introduce with a simple patch :(
>
> @Ulf, since this is material for 5.10 I was planning to resend the
> original patch itself with all the things fixed. Will you be able to
> rebase your tree? Or do you want to apply fixes separately ?
I have rebased my tree, to get rid of the problems completely.
Thanks everybody for helping out!
Kind regards
Uffe
Powered by blists - more mailing lists