Re: [PATCH] spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jul 19, 2022 at 09:55:15AM +0200, Marc Kleine-Budde wrote:

> The difference is (Jens Lindahl):
> 
> +	if (bs->tx_dma_active) {
> +		dmaengine_terminate_sync(ctlr->dma_tx);
> +		bs->tx_dma_active = false;
> +	}
> 
> vs. (me):
> 
> +	if (ctlr->dma_tx) {
> +		dmaengine_terminate_sync(ctlr->dma_tx);
> +		bs->tx_dma_active = false;
> +	}
> 
> Which one is preferred?

Probably checking dma_tx is a bit more robust, though it shouldn't
matter really.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux