linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: rockchip: Fix a resource that is put twice in rockchip_spi_remove()
@ 2022-05-29  7:07 Christophe JAILLET
  2022-05-29  7:17 ` Christophe JAILLET
  0 siblings, 1 reply; 2+ messages in thread
From: Christophe JAILLET @ 2022-05-29  7:07 UTC (permalink / raw)
  To: Mark Brown, Heiko Stuebner, addy ke
  Cc: linux-kernel, kernel-janitors, Christophe JAILLET, Mark Brown,
	linux-spi, linux-arm-kernel, linux-rockchip

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;
 }
 
-- 
2.34.1


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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: rockchip: Fix a resource that is put twice in rockchip_spi_remove()
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Christophe JAILLET @ 2022-05-29  7:17 UTC (permalink / raw)
  To: Mark Brown, Heiko Stuebner, addy ke
  Cc: linux-kernel, kernel-janitors, Mark Brown, linux-spi,
	linux-arm-kernel, linux-rockchip

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-29  7:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).