From: Dan Carpenter <dan.carpenter@oracle.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: okaya@kernel.org, agross@kernel.org, bjorn.andersson@linaro.org,
vkoul@kernel.org, dan.j.williams@intel.com,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe
Date: Tue, 28 Apr 2020 15:54:26 +0300 [thread overview]
Message-ID: <20200428125426.GE2014@kadam> (raw)
In-Reply-To: <20200427111043.70218-1-christophe.jaillet@wanadoo.fr>
On Mon, Apr 27, 2020 at 01:10:43PM +0200, Christophe JAILLET wrote:
> There is no need to call 'hidma_debug_uninit()' in the error handling
> path. 'hidma_debug_init()' has not been called yet.
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> drivers/dma/qcom/hidma.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
> index 411f91fde734..87490e125bc3 100644
> --- a/drivers/dma/qcom/hidma.c
> +++ b/drivers/dma/qcom/hidma.c
> @@ -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;
}
if (!msi) {
hidma_ll_setup_irq(dmadev->lldev, false);
rc = devm_request_irq(&pdev->dev, chirq, hidma_chirq_handler,
0, "qcom-hidma", dmadev->lldev);
if (rc)
goto uninit;
}
> hidma_free_msis(dmadev);
>
> - hidma_debug_uninit(dmadev);
> hidma_ll_uninit(dmadev->lldev);
> dmafree:
> if (dmadev)
^^^^^^
This test isn't necessary and should be deleted.
regards,
dan carpenter
next prev parent reply other threads:[~2020-04-28 12:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 11:10 [PATCH] dmaengine: qcom_hidma: Simplify error handling path in hidma_probe Christophe JAILLET
2020-04-27 16:08 ` Vinod Koul
2020-04-28 12:54 ` Dan Carpenter [this message]
2020-04-28 16:01 ` Sinan Kaya
2020-04-28 17:21 ` Dan Carpenter
2020-04-28 20:29 ` Sinan Kaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200428125426.GE2014@kadam \
--to=dan.carpenter@oracle.com \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=okaya@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).