dw-dma: remove superfluous check

In dw_dma_start() .lli_current cannot be NULL. If it were NULL, lines
following the check, would cause a NULL-pointer dereference. Remove
the superfluous check.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2019-01-16 13:23:39 +01:00 committed by Liam Girdwood
parent 1f97d44a3b
commit e5bc088e04
1 changed files with 2 additions and 5 deletions

View File

@ -447,11 +447,8 @@ static int dw_dma_start(struct dma *dma, int channel)
#if DW_USE_HW_LLI
/* TODO: Revisit: are we using LLP mode or single transfer ? */
if (p->chan[channel].lli_current) {
/* LLP mode - write LLP pointer */
dw_write(dma, DW_LLP(channel),
(uint32_t)p->chan[channel].lli_current);
}
dw_write(dma, DW_LLP(channel), (uint32_t)p->chan[channel].lli_current);
#endif
/* channel needs started from scratch, so write SARn, DARn */
dw_write(dma, DW_SAR(channel), p->chan[channel].lli_current->sar);