Commit 4483320e authored by Maninder Singh's avatar Maninder Singh Committed by Vinod Koul

dmaengine: Use Pointer xt after NULL check.

Removing static analysis error:-
Possible null pointer dereference: xt

Because currently xt is dereferenced before NULL check,
Thus Use it after NULL Check.
Signed-off-by: default avatarManinder Singh <maninder1.s@samsung.com>
Reviewed-by: default avatarVaneet Narang <v.narang@samsung.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent fce9a74b
...@@ -659,14 +659,14 @@ atc_prep_dma_interleaved(struct dma_chan *chan, ...@@ -659,14 +659,14 @@ atc_prep_dma_interleaved(struct dma_chan *chan,
size_t len = 0; size_t len = 0;
int i; int i;
if (unlikely(!xt || xt->numf != 1 || !xt->frame_size))
return NULL;
dev_info(chan2dev(chan), dev_info(chan2dev(chan),
"%s: src=0x%08x, dest=0x%08x, numf=%d, frame_size=%d, flags=0x%lx\n", "%s: src=0x%08x, dest=0x%08x, numf=%d, frame_size=%d, flags=0x%lx\n",
__func__, xt->src_start, xt->dst_start, xt->numf, __func__, xt->src_start, xt->dst_start, xt->numf,
xt->frame_size, flags); xt->frame_size, flags);
if (unlikely(!xt || xt->numf != 1 || !xt->frame_size))
return NULL;
/* /*
* The controller can only "skip" X bytes every Y bytes, so we * The controller can only "skip" X bytes every Y bytes, so we
* need to make sure we are given a template that fit that * need to make sure we are given a template that fit that
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment