linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Mark Brown <broonie@kernel.org>, Heiko Stuebner <heiko@sntech.de>,
	addy ke <addy.ke@rock-chips.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Mark Brown <broonie@linaro.org>,
	linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] spi: rockchip: Fix a resource that is put twice in rockchip_spi_remove()
Date: Sun, 29 May 2022 09:17:09 +0200	[thread overview]
Message-ID: <097dca7f-12ba-ddbc-7380-05f3278fe40b@wanadoo.fr> (raw)
In-Reply-To: <df2f4ae902474574ccdb0a8696ce51db39fbd239.1653808056.git.christophe.jaillet@wanadoo.fr>

Le 29/05/2022 à 09:07, Christophe JAILLET a écrit :
> spi_controller_put() is already called as part of
> spi_unregister_controller(). The latter is called automatically because
> the controller has been registered with the devm_ function.
> 
> Remove the duplicate call.
> 
> Fixes: 64e36824b32b ("spi/rockchip: add driver for Rockchip RK3xxx SoCs integrated SPI")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
>   drivers/spi/spi-rockchip.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
> index a08215eb9e14..70777731b20e 100644
> --- a/drivers/spi/spi-rockchip.c
> +++ b/drivers/spi/spi-rockchip.c
> @@ -963,8 +963,6 @@ static int rockchip_spi_remove(struct platform_device *pdev)
>   	if (ctlr->dma_rx)
>   		dma_release_channel(ctlr->dma_rx);
>   
> -	spi_controller_put(ctlr);
> -
>   	return 0;
>   }
>   

NAK.

There is a spi_controller_get() call a few lines above, so this 
additional spi_controller_put() is needed.

CJ

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-29  7:07 [PATCH] spi: rockchip: Fix a resource that is put twice in rockchip_spi_remove() Christophe JAILLET
2022-05-29  7:17 ` Christophe JAILLET [this message]

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=097dca7f-12ba-ddbc-7380-05f3278fe40b@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=addy.ke@rock-chips.com \
    --cc=broonie@kernel.org \
    --cc=broonie@linaro.org \
    --cc=heiko@sntech.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-spi@vger.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).