mirror of https://gitee.com/openkylin/linux.git
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:
parent
595a334148
commit
ba42f61b36
|
@ -630,7 +630,7 @@ static struct dma_async_tx_descriptor *bam_prep_slave_sg(struct dma_chan *chan,
|
|||
GFP_NOWAIT);
|
||||
|
||||
if (!async_desc)
|
||||
goto err_out;
|
||||
return NULL;
|
||||
|
||||
if (flags & DMA_PREP_FENCE)
|
||||
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);
|
||||
|
||||
err_out:
|
||||
kfree(async_desc);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue