diff options
author | Colin Ian King <colin.king@canonical.com> | 2019-05-09 00:33:29 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2019-05-21 10:55:52 +0200 |
commit | 0788611c9a0925c607de536b2449de5ed98ef8df (patch) | |
tree | c26111be9939a5b470fbce3a359aba2823de99e2 /drivers/dma/owl-dma.c | |
parent | dmaengine: fsl-qdma: Add improvement (diff) | |
download | linux-0788611c9a0925c607de536b2449de5ed98ef8df.tar.xz linux-0788611c9a0925c607de536b2449de5ed98ef8df.zip |
dmaengine: dw-axi-dmac: fix null dereference when pointer first is null
In the unlikely event that axi_desc_get returns a null desc in the
very first iteration of the while-loop the error exit path ends
up calling axi_desc_put on a null pointer 'first' and this causes
a null pointer dereference. Fix this by adding a null check on
pointer 'first' before calling axi_desc_put.
Addresses-Coverity: ("Explicit null dereference")
Fixes: 1fe20f1b8454 ("dmaengine: Introduce DW AXI DMAC driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/owl-dma.c')
0 files changed, 0 insertions, 0 deletions