summaryrefslogtreecommitdiff
path: root/drivers/dma/dw-axi-dmac
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-02-03 13:46:52 +0000
committerVinod Koul <vkoul@kernel.org>2021-02-08 17:39:39 +0530
commiteda38ce482b2c88b27e3a7c8aa1ddffa646f3e7f (patch)
treec5f3623acf0596455d27aa8b08fde1c1cd4fd70a /drivers/dma/dw-axi-dmac
parentba61c3692034a317499c6d68ccb4543a804dff24 (diff)
dmaengine: dw-axi-dmac: remove redundant null check on desc
The pointer desc is being null checked twice, the second null check is redundant because desc has not been re-assigned between the checks. Remove the redundant second null check on desc. Fixes: ef6fb2d6f1ab ("dmaengine: dw-axi-dmac: simplify descriptor management") Signed-off-by: Colin Ian King <colin.king@canonical.com> Tested-by: Sia Jee Heng <jee.heng.sia@intel.com> Reviewed-by: Sia Jee Heng <jee.heng.sia@intel.com> Addresses-Coverity: ("Logically dead code") Link: https://lore.kernel.org/r/20210203134652.22618-1-colin.king@canonical.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/dw-axi-dmac')
-rw-r--r--drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
index ac3d81b72a15..d9e4ac3edb4e 100644
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
@@ -919,10 +919,6 @@ dma_chan_prep_dma_memcpy(struct dma_chan *dchan, dma_addr_t dst_adr,
num++;
}
- /* Total len of src/dest sg == 0, so no descriptor were allocated */
- if (unlikely(!desc))
- return NULL;
-
/* Set end-of-link to the last link descriptor of list */
set_desc_last(&desc->hw_desc[num - 1]);
/* Managed transfer list */