forked from luck/tmp_suning_uos_patched
dmaengine: pl330: Check if the DMA descriptor is NULL
Commit 6079d38
("dmaengine: pl330: Remove useless xfer_cb indirection")
removed the __callback() function which created an unnecessary level of
indirection to execute the tranfer callback .xfer_cb
Unfortunately the commit also changed the semantics slightly since that
function used to check if the request was not NULL before attempting to
execute the callback function. Not checking this could lead to a kernel
NULL pointer dereference error.
Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
parent
ff4d02419a
commit
b1e51d771f
@ -1441,9 +1441,14 @@ static int pl330_submit_req(struct pl330_thread *thrd,
|
||||
|
||||
static void dma_pl330_rqcb(struct dma_pl330_desc *desc, enum pl330_op_err err)
|
||||
{
|
||||
struct dma_pl330_chan *pch = desc->pchan;
|
||||
struct dma_pl330_chan *pch;
|
||||
unsigned long flags;
|
||||
|
||||
if (!desc)
|
||||
return;
|
||||
|
||||
pch = desc->pchan;
|
||||
|
||||
/* If desc aborted */
|
||||
if (!pch)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user