Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Colin Ian King and committed by
Vinod Koul
eda38ce4 ba61c369

-4
-4
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
··· 919 919 num++; 920 920 } 921 921 922 - /* Total len of src/dest sg == 0, so no descriptor were allocated */ 923 - if (unlikely(!desc)) 924 - return NULL; 925 - 926 922 /* Set end-of-link to the last link descriptor of list */ 927 923 set_desc_last(&desc->hw_desc[num - 1]); 928 924 /* Managed transfer list */