Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 06f8db4b authored by Sachin Kamat's avatar Sachin Kamat Committed by Vinod Koul
Browse files

dma: imx-dma: Remove redundant NULL check



kfree on a NULL pointer is a no-op. Null pointer check is
not necessary.

Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 6b9019a7
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -805,11 +805,9 @@ static void imxdma_free_chan_resources(struct dma_chan *chan)
	}
	INIT_LIST_HEAD(&imxdmac->ld_free);

	if (imxdmac->sg_list) {
	kfree(imxdmac->sg_list);
	imxdmac->sg_list = NULL;
}
}

static struct dma_async_tx_descriptor *imxdma_prep_slave_sg(
		struct dma_chan *chan, struct scatterlist *sgl,