dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Wan Jiabing <wanjiabing@vivo.com>, Vinod Koul <vkoul@kernel.org>,
	Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang7@gmail.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/4] dmaengine: ep93xx_dma: Remove unneeded ERROR check before clk_put
Date: Wed, 18 May 2022 09:12:05 +0200	[thread overview]
Message-ID: <c7c49632-b4b6-6252-76b5-d3aa45b08339@linaro.org> (raw)
In-Reply-To: <20220516084139.8864-2-wanjiabing@vivo.com>

On 16/05/2022 10:41, Wan Jiabing wrote:
> clk_put() already uses !clk and IS_ERR(clk) to check ERROR or NULL.
> Remove unneeded ERROR or NULL check for edmac->clk.
> 
> Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
> ---
>  drivers/dma/ep93xx_dma.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
> index 971ff5f9ae84..60dc7b3f3d0d 100644
> --- a/drivers/dma/ep93xx_dma.c
> +++ b/drivers/dma/ep93xx_dma.c
> @@ -1398,8 +1398,7 @@ static int __init ep93xx_dma_probe(struct platform_device *pdev)
>  	if (unlikely(ret)) {
>  		for (i = 0; i < edma->num_channels; i++) {
>  			struct ep93xx_dma_chan *edmac = &edma->channels[i];
> -			if (!IS_ERR_OR_NULL(edmac->clk))
> -				clk_put(edmac->clk);
> +			clk_put(edmac->clk);

clk_put() which calls __clk_put() seems to print warning on IS_ERR, so
this does not look equivalent code.


Best regards,
Krzysztof

  reply	other threads:[~2022-05-18  7:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  8:41 [PATCH 0/4] dmaengine: Remove unneeded ERROR checks before clk_xxx Wan Jiabing
2022-05-16  8:41 ` [PATCH 1/4] dmaengine: ep93xx_dma: Remove unneeded ERROR check before clk_put Wan Jiabing
2022-05-18  7:12   ` Krzysztof Kozlowski [this message]
2022-05-16  8:41 ` [PATCH 2/4] dmaengine: sprd-dma: Remove unneeded ERROR check before clk_disable_unprepare Wan Jiabing
2022-05-17 15:13   ` Krzysztof Kozlowski
2022-05-18  2:44     ` Jiabing Wan
2022-05-18  7:10       ` Krzysztof Kozlowski
2022-05-18  7:12   ` Krzysztof Kozlowski
2022-05-16  8:41 ` [PATCH 3/4] dmaengine: ste_dma40: Remove unneeded ERROR and NULL check in ste_dma40 Wan Jiabing
2022-05-18  7:15   ` Krzysztof Kozlowski
2022-05-19  6:34     ` Jiabing Wan
2022-05-16  8:41 ` [PATCH 4/4] dmaengine: xgene-dma: Remove unneeded ERROR check before clk_disable_unprepare Wan Jiabing

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=c7c49632-b4b6-6252-76b5-d3aa45b08339@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=baolin.wang7@gmail.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=vkoul@kernel.org \
    --cc=wanjiabing@vivo.com \
    --cc=zhang.lyra@gmail.com \
    /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).