Commit 7a09c09c authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Vinod Koul
Browse files

dmaengine: ti: omap-dma: Remove 'Assignment in if condition'



While the compiler does not have problem with how it is implemented,
checkpatch does give en ERROR for this arrangement.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190730132015.2863-1-peter.ujfalusi@ti.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent e3b9fef8
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -814,7 +814,6 @@ static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
	dma_cookie_t cookie, struct dma_tx_state *txstate)
{
	struct omap_chan *c = to_omap_dma_chan(chan);
	struct virt_dma_desc *vd;
	enum dma_status ret;
	unsigned long flags;
	struct omap_desc *d = NULL;
@@ -841,9 +840,13 @@ static enum dma_status omap_dma_tx_status(struct dma_chan *chan,
			pos = 0;

		txstate->residue = omap_dma_desc_size_pos(d, pos);
	} else if ((vd = vchan_find_desc(&c->vc, cookie))) {
		txstate->residue = omap_dma_desc_size(to_omap_dma_desc(&vd->tx));
	} else {
		struct virt_dma_desc *vd = vchan_find_desc(&c->vc, cookie);

		if (vd)
			txstate->residue = omap_dma_desc_size(
						to_omap_dma_desc(&vd->tx));
		else
			txstate->residue = 0;
	}