re: dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}

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

 



Hello Christoph Hellwig,

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

The patch 60ff3365096f: "dma-mapping: consolidate
dma_{alloc,free}_{attrs,coherent}" from Aug 25, 2015, leads to the
following Smatch complaint:

arch/x86/kernel/pci-dma.c:137 arch_dma_alloc_attrs()
	 warn: variable dereferenced before check '*dev' (see line 134)

arch/x86/kernel/pci-dma.c
   133	{
   134		*gfp = dma_alloc_coherent_gfp_flags(*dev, *gfp);
                                                    ^^^^
Dereferenced inside function call.

   135		*gfp &= ~(__GFP_DMA | __GFP_HIGHMEM | __GFP_DMA32);
   136	
   137		if (!*dev)
                    ^^^^^
Too late.

   138			*dev = &x86_dma_fallback_dev;
   139		if (!is_device_dma_capable(*dev))

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



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux