9 Mar
2018
9 Mar
'18
12:43 a.m.
detected with sonarcloud: fix pointer test and avoid redundant evaluation of lli as always true.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- src/drivers/dw-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/drivers/dw-dma.c b/src/drivers/dw-dma.c index f6f776a..7659bec 100644 --- a/src/drivers/dw-dma.c +++ b/src/drivers/dw-dma.c @@ -779,7 +779,7 @@ static inline void dw_dma_chan_reload_lli(struct dma *dma, int channel) struct dw_lli2 *lli = p->chan[channel].lli_current;
/* only need to reload if this is a block transfer */ - if (lli == 0 || (lli && lli->llp == 0)) { + if (!lli || lli->llp == 0) { p->chan[channel].status = COMP_STATE_PREPARE; return; }
--
2.14.1