Commit ba42f61b authored by Zheng Yongjun's avatar Zheng Yongjun Committed by Vinod Koul
Browse files

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: default avatarZheng Yongjun <zhengyongjun3@huawei.com>
Reviewed-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20201216130649.13979-1-zhengyongjun3@huawei.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 595a3341
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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;
}

/**