Commit ed30933e6f3dbeaaab1de91e1bec25f42d5d32df

Authored by Cong Ding
Committed by Vinod Koul
1 parent 661f7cb55c

dma: remove unnecessary null pointer check in mmp_pdma.c

the pointer cfg is dereferenced in line 594, so it's no reason to check null
again in line 620.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>

Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff

drivers/dma/mmp_pdma.c
... ... @@ -617,10 +617,8 @@
617 617 else if (maxburst == 32)
618 618 chan->dcmd |= DCMD_BURST32;
619 619  
620   - if (cfg) {
621   - chan->dir = cfg->direction;
622   - chan->drcmr = cfg->slave_id;
623   - }
  620 + chan->dir = cfg->direction;
  621 + chan->drcmr = cfg->slave_id;
624 622 chan->dev_addr = addr;
625 623 break;
626 624 default: