Re: [PATCH] dmaengine: dw-edma: Fix (and simplify) the probe broken since ecb8c88bd31c

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

 



On 09-11-21, 22:09, Christophe JAILLET wrote:
> The commit in the Fixes: tag has changed the logic of the code and now it
> is likely that the probe will return an early success (0), even if not
> completely executed.
> 
> This should lead to a crash or similar issue later on when the code
> accesses to some never allocated resources.
> 
> Change the '!err' into a 'err' when checking if
> 'dma_set_mask_and_coherent()' has failed or not.
> 
> While at it, simplify the code and remove the "can't success code" related
> to 32 DMA mask.
> As stated in [1], 'dma_set_mask_and_coherent(DMA_BIT_MASK(64))' can't fail
> if 'dev->dma_mask' is non-NULL. And if it is NULL, it would fail for the
> same reason when tried with DMA_BIT_MASK(32).

The patch title should describe the changes in the patch and not the
outcome! So I have taken the liberty to update this to:
dmaengine: dw-edma: Fix return value check for dma_set_mask_and_coherent()

-- 
~Vinod



[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 PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux