[bug report] dmaengine: ptdma: Utilize the AE4DMA engine's multi-queue functionality

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

 



Hello Basavaraj Natikar,

This is a semi-automatic email about new static checker warnings.

Commit 656543989457 ("dmaengine: ptdma: Utilize the AE4DMA engine's
multi-queue functionality") from Feb 3, 2025, leads to the following
Smatch complaint:

    drivers/dma/amd/ptdma/ptdma-dmaengine.c:358 pt_cmd_callback_work()
    warn: variable dereferenced before check 'desc' (see line 345)

drivers/dma/amd/ptdma/ptdma-dmaengine.c
   344	
   345		dma_chan = desc->vd.tx.chan;
                           ^^^^^^
desc is dereferenced

   346		chan = to_pt_chan(dma_chan);
   347	
   348		if (err == -EINPROGRESS)
   349			return;
   350	
   351		tx_desc = &desc->vd.tx;
   352		vd = &desc->vd;
   353	
   354		if (err)
   355			desc->status = DMA_ERROR;
   356	
   357		spin_lock_irqsave(&chan->vc.lock, flags);
   358		if (desc) {
                    ^^^^
So this check is too late.

   359			if (desc->status != DMA_COMPLETE) {
   360				if (desc->status != DMA_ERROR)

regards,
dan carpenter




[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