lkml.org 
[lkml]   [2022]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] dmaengine: stm32-mdma: Remove dead code in stm32_mdma_irq_handler()
From
Hi Alexey,

On 6/13/22 00:23, Alexey Khoroshilov wrote:
> Local variable chan is initialized by an address of element of chan array
> that is part of stm32_mdma_device struct, so it does not make sense to
> compare chan with NULL.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> Fixes: a4ffb13c8946 ("dmaengine: Add STM32 MDMA driver")
> ---
> drivers/dma/stm32-mdma.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c
> index caf0cce8f528..b11927ed4367 100644
> --- a/drivers/dma/stm32-mdma.c
> +++ b/drivers/dma/stm32-mdma.c
> @@ -1328,12 +1328,7 @@ static irqreturn_t stm32_mdma_irq_handler(int irq, void *devid)
> return IRQ_NONE;
> }
> id = __ffs(status);
> -
> chan = &dmadev->chan[id];
> - if (!chan) {
> - dev_warn(mdma2dev(dmadev), "MDMA channel not initialized\n");
> - return IRQ_NONE;
> - }
>
> /* Handle interrupt for the channel */
> spin_lock(&chan->vchan.lock);

Thanks for your patch,

Reviewed-by: Amelie Delaunay <amelie.delaunay@foss.st.com>

\
 
 \ /
  Last update: 2022-06-15 16:44    [W:0.058 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site