lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110519190223.GH5109@ponder.secretlab.ca>
Date:	Thu, 19 May 2011 13:02:23 -0600
From:	Grant Likely <grant.likely@...retlab.ca>
To:	Axel Lin <axel.lin@...il.com>
Cc:	linux-kernel@...r.kernel.org, Erik Gilling <konkers@...roid.com>,
	spi-devel-general@...ts.sourceforge.net
Subject: Re: [PATCH 2/2] spi: spi_tegra: calling spi_unregister_master
 instead of spi_master_put in spi_tegra_remove

On Wed, May 11, 2011 at 09:28:16PM +0800, Axel Lin wrote:
> spi_master_put() should only be used in error handling.
> Once spi_register_master() returns success, we should call
> spi_unregister_master() instead.
> 
> Signed-off-by: Axel Lin <axel.lin@...il.com>

Applied, thanks.

g.

> ---
>  drivers/spi/spi_tegra.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/spi/spi_tegra.c b/drivers/spi/spi_tegra.c
> index 891e590..6c3aa6e 100644
> --- a/drivers/spi/spi_tegra.c
> +++ b/drivers/spi/spi_tegra.c
> @@ -578,6 +578,7 @@ static int __devexit spi_tegra_remove(struct platform_device *pdev)
>  	master = dev_get_drvdata(&pdev->dev);
>  	tspi = spi_master_get_devdata(master);
>  
> +	spi_unregister_master(master);
>  	tegra_dma_free_channel(tspi->rx_dma);
>  
>  	dma_free_coherent(&pdev->dev, sizeof(u32) * BB_LEN,
> @@ -586,7 +587,6 @@ static int __devexit spi_tegra_remove(struct platform_device *pdev)
>  	clk_put(tspi->clk);
>  	iounmap(tspi->base);
>  
> -	spi_master_put(master);
>  	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	release_mem_region(r->start, (r->end - r->start) + 1);
>  
> -- 
> 1.7.1
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ