[bug report] dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00

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

 



Hello Green Wan,

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

The patch 6973886ad58e: "dmaengine: sf-pdma: add platform DMA support 
for HiFive Unleashed A00" from Nov 7, 2019, leads to the following 
Smatch complaint:

    drivers/dma/sf-pdma/sf-pdma.c:103 sf_pdma_prep_dma_memcpy()
     error: we previously assumed 'chan' could be null (see line 97)

drivers/dma/sf-pdma/sf-pdma.c
    96	
    97		if (chan && (!len || !dest || !src)) {
                    ^^^^
Check for NULL

    98			dev_err(chan->pdma->dma_dev.dev,
    99				"Please check dma len, dest, src!\n");
   100			return NULL;
   101		}
   102	
   103		desc = sf_pdma_alloc_desc(chan);
                                          ^^^^
Unchecked dereference inside the function.

   104		if (!desc)
   105			return NULL;

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