lkml.org 
[lkml]   [2022]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] spi: rockchip: Fix a resource that is put twice in rockchip_spi_remove()
From
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

\
 
 \ /
  Last update: 2022-05-29 09:17    [W:0.040 / U:0.212 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site