mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
staging: mt7621-dma: Remove assignment in if
Fixes checkpatch error: ASSIGN_IN_IF by adding an inner if in the else path, this also avoids calling vchan_find_desc when not needed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c1a3a34081
commit
c48f6ac12c
1 changed files with 5 additions and 2 deletions
|
@ -689,8 +689,11 @@ static enum dma_status gdma_dma_tx_status(struct dma_chan *c,
|
|||
((chan->next_sg - 1) * desc->sg[0].len);
|
||||
else
|
||||
state->residue = desc->residue;
|
||||
} else if ((vdesc = vchan_find_desc(&chan->vchan, cookie)))
|
||||
state->residue = to_gdma_dma_desc(vdesc)->residue;
|
||||
} else {
|
||||
vdesc = vchan_find_desc(&chan->vchan, cookie);
|
||||
if (vdesc)
|
||||
state->residue = to_gdma_dma_desc(vdesc)->residue;
|
||||
}
|
||||
spin_unlock_irqrestore(&chan->vchan.lock, flags);
|
||||
|
||||
dev_dbg(c->device->dev, "tx residue %d bytes\n", state->residue);
|
||||
|
|
Loading…
Reference in a new issue