Skip to content

Commit 96a3713

Browse files
syamsidhardhanVinod Koul
authored andcommitted
dma: imx-dma: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
1 parent 88ff6ab commit 96a3713

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎drivers/dma/imx-dma.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,7 @@ static struct dma_async_tx_descriptor *imxdma_prep_dma_cyclic(
859859

860860
desc = list_first_entry(&imxdmac->ld_free, struct imxdma_desc, node);
861861

862-
if (imxdmac->sg_list)
863-
kfree(imxdmac->sg_list);
862+
kfree(imxdmac->sg_list);
864863

865864
imxdmac->sg_list = kcalloc(periods + 1,
866865
sizeof(struct scatterlist), GFP_KERNEL);

0 commit comments

Comments
 (0)