From: Jaejoon Yoo Date: Wed, 28 Dec 2016 06:19:54 +0000 (+0900) Subject: DMA: svace fix: Add code for handling null (WGID: 58265). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0c571edbcd90d950ee05cc0e73f6dcdf2fb8df7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git DMA: svace fix: Add code for handling null (WGID: 58265). Change-Id: I168bd2e9effaa27ff1bdcdcce946905697f298b9 Signed-off-by: Jaejoon Yoo --- diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index b5c831ee56ac..987309e25429 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2929,7 +2929,10 @@ pl330_prep_slave_sg(struct dma_chan *chan, struct scatterlist *sgl, } /* Return the last desc in the chain */ - desc->txd.flags = flg; + if (desc) + desc->txd.flags = flg; + else + return NULL; return &desc->txd; }