[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200428172116.GG2014@kadam>
Date:   Tue, 28 Apr 2020 20:21:16 +0300
From:   Dan Carpenter <dan.carpenter@...cle.com>
To:     Sinan Kaya <okaya@...nel.org>
Cc:     Christophe JAILLET <christophe.jaillet@...adoo.fr>,
        agross@...nel.org, bjorn.andersson@...aro.org, vkoul@...nel.org,
        dan.j.williams@...el.com, linux-arm-kernel@...ts.infradead.org,
        linux-arm-msm@...r.kernel.org, dmaengine@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in
 hidma_probe
I apologize, I wrote my code hurriedly and did no explain the bug well.
I understood what the code is doing, but my fix was missing an if
condition.
On Tue, Apr 28, 2020 at 12:01:15PM -0400, Sinan Kaya wrote:
> On 4/28/2020 8:54 AM, Dan Carpenter wrote:
> >> @@ -897,7 +897,6 @@ static int hidma_probe(struct platform_device *pdev)
> >>  	if (msi)
> >             ^^^
> > This test doesn't work.  It will call free hidma_free_msis() if the
> > hidma_request_msi() call fails.  We should do:
> > 
> > 	if (msi) {
> > 		rc = hidma_request_msi(dmadev, pdev);
> > 		msi = false;
What I meant to say here was:
	if (msi) {
		rc = hidma_request_msi(dmadev, pdev);
		if (rc)
			msi = false;
Otherwise we end up checking freeing the msi in the error handling
code when we did not take it.
Hopefully, that clears things up?
regards,
dan carpenter
Powered by blists - more mailing lists