re: dmaengine: Add STM32 DMA driver

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

 



Hello M'boumba Cedric Madianga,

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

The patch d8b468394fb7: "dmaengine: Add STM32 DMA driver" from Oct 
16, 2015, leads to the following Smatch complaint:

drivers/dma/stm32-dma.c:562 stm32_dma_issue_pending()
	 error: we previously assumed 'chan->desc' could be null (see line 560)

drivers/dma/stm32-dma.c
   559		if (!chan->busy) {
   560			if (vchan_issue_pending(&chan->vchan) && !chan->desc) {
                                                                  ^^^^^^^^^^
Check.

   561				ret = stm32_dma_start_transfer(chan);
   562				if ((chan->desc->cyclic) && (!ret))
                                     ^^^^^^^^^^^^^^^^^^
Unchecked dereference.

There are some paths where stm32_dma_start_transfer() does allocate
chan->desc but keep in mind that just because it returns zero doesn't
mean that it was allocated.  For example if vchan_next_desc() returns
NULL then stm32_dma_start_transfer() returns success without allocating
->desc.

   563					stm32_dma_configure_next_sg(chan);
   564			}

regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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