drivers: mtk: remove superfluous variable for mt8195

For GCC compile error,
error: variable 'ret' set but not use

Signed-off-by: YC Hung <yc.hung@mediatek.com>
Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
This commit is contained in:
Allen-KH Cheng 2021-09-09 14:32:24 +08:00 committed by Liam Girdwood
parent 83093dadea
commit 954149cdfb
1 changed files with 6 additions and 9 deletions

View File

@ -465,7 +465,6 @@ static int memif_status(struct dma_chan_data *channel, struct dma_chan_status *s
static int memif_set_config(struct dma_chan_data *channel, struct dma_sg_config *config)
{
struct afe_memif_dma *memif = dma_chan_get_data(channel);
int ret;
int dai_id;
int irq_id;
unsigned int dma_addr;
@ -482,19 +481,17 @@ static int memif_set_config(struct dma_chan_data *channel, struct dma_sg_config
switch (config->direction) {
case DMA_DIR_MEM_TO_DEV:
if (direction != MEM_DIR_PLAYBACK) {
ret = -EINVAL;
break;
}
if (direction != MEM_DIR_PLAYBACK)
return -EINVAL;
dai_id = (int)AFE_HS_GET_DAI(config->dest_dev);
irq_id = (int)AFE_HS_GET_IRQ(config->dest_dev);
dma_addr = (int)config->elem_array.elems[0].src;
break;
case DMA_DIR_DEV_TO_MEM:
if (direction != MEM_DIR_CAPTURE) {
ret = -EINVAL;
break;
}
if (direction != MEM_DIR_CAPTURE)
return -EINVAL;
dai_id = (int)AFE_HS_GET_DAI(config->src_dev);
irq_id = (int)AFE_HS_GET_IRQ(config->src_dev);
dma_addr = (int)config->elem_array.elems[0].dest;