qcom: bam_dma: Delete useless kfree code
The parameter of kfree function is NULL, so kfree code is useless, delete it. Therefore, goto expression is no longer needed, so simplify it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20201216130649.13979-1-zhengyongjun3@huawei.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Родитель
595a334148
Коммит
ba42f61b36
|
@ -630,7 +630,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
|
||||||
GFP_NOWAIT);
|
GFP_NOWAIT);
|
||||||
|
|
||||||
if (!async_desc)
|
if (!async_desc)
|
||||||
goto err_out;
|
return NULL;
|
||||||
|
|
||||||
if (flags & DMA_PREP_FENCE)
|
if (flags & DMA_PREP_FENCE)
|
||||||
async_desc->flags |= DESC_FLAG_NWD;
|
async_desc->flags |= DESC_FLAG_NWD;
|
||||||
|
@ -670,10 +670,6 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
|
||||||
}
|
}
|
||||||
|
|
||||||
return vchan_tx_prep(&bchan->vc, &async_desc->vd, flags);
|
return vchan_tx_prep(&bchan->vc, &async_desc->vd, flags);
|
||||||
|
|
||||||
err_out:
|
|
||||||
kfree(async_desc);
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Загрузка…
Ссылка в новой задаче