diff options
author | Cong Ding <dinggnu@gmail.com> | 2013-01-14 19:19:48 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-01-20 08:49:40 -0500 |
commit | ed30933e6f3dbeaaab1de91e1bec25f42d5d32df (patch) | |
tree | f4953c62c1a7a5dfa0cf21ecce89d35d0a55906c /drivers/dma/mmp_pdma.c | |
parent | 661f7cb55c61fa7491e0caf21e55f59e5bc49abe (diff) |
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>
Diffstat (limited to 'drivers/dma/mmp_pdma.c')
-rw-r--r-- | drivers/dma/mmp_pdma.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/mmp_pdma.c b/drivers/dma/mmp_pdma.c index 13bdf4a7e1ec..41ad6a62f838 100644 --- a/drivers/dma/mmp_pdma.c +++ b/drivers/dma/mmp_pdma.c | |||
@@ -617,10 +617,8 @@ static int mmp_pdma_control(struct dma_chan *dchan, enum dma_ctrl_cmd cmd, | |||
617 | else if (maxburst == 32) | 617 | else if (maxburst == 32) |
618 | chan->dcmd |= DCMD_BURST32; | 618 | chan->dcmd |= DCMD_BURST32; |
619 | 619 | ||
620 | if (cfg) { | 620 | chan->dir = cfg->direction; |
621 | chan->dir = cfg->direction; | 621 | chan->drcmr = cfg->slave_id; |
622 | chan->drcmr = cfg->slave_id; | ||
623 | } | ||
624 | chan->dev_addr = addr; | 622 | chan->dev_addr = addr; |
625 | break; | 623 | break; |
626 | default: | 624 | default: |