* re: dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}
@ 2015-09-12 19:50 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-09-12 19:50 UTC (permalink / raw)
To: kernel-janitors
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-09-12 19:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-12 19:50 dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent} Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox