diff --git a/src/drivers/mediatek/mt8186/afe-drv.c b/src/drivers/mediatek/mt8186/afe-drv.c index 00b02ecb4..4ac56c19c 100644 --- a/src/drivers/mediatek/mt8186/afe-drv.c +++ b/src/drivers/mediatek/mt8186/afe-drv.c @@ -394,17 +394,17 @@ err_alloc_memif: return -ENOMEM; } -int afe_remove(struct mtk_base_afe *afe) +void afe_remove(struct mtk_base_afe *afe) { afe->ref_count--; if (afe->ref_count > 0) - return 0; + return; if (afe->ref_count < 0) { afe->ref_count = 0; tr_dbg(&afedrv_tr, "afe ref_count < 0, :%d\n", afe->ref_count); - return 0; + return; } rfree(afe->memif); @@ -415,6 +415,5 @@ int afe_remove(struct mtk_base_afe *afe) rfree(afe->irqs); afe->irqs = NULL; - - return 0; } + diff --git a/src/drivers/mediatek/mt8195/afe-drv.c b/src/drivers/mediatek/mt8195/afe-drv.c index 01632bcdc..90e7e94a1 100644 --- a/src/drivers/mediatek/mt8195/afe-drv.c +++ b/src/drivers/mediatek/mt8195/afe-drv.c @@ -388,17 +388,17 @@ err_alloc_memif: return -ENOMEM; } -int afe_remove(struct mtk_base_afe *afe) +void afe_remove(struct mtk_base_afe *afe) { afe->ref_count--; if (afe->ref_count > 0) - return 0; + return; if (afe->ref_count < 0) { afe->ref_count = 0; tr_dbg(&afedrv_tr, "afe ref_count < 0, :%d\n", afe->ref_count); - return 0; + return; } rfree(afe->memif); @@ -410,5 +410,5 @@ int afe_remove(struct mtk_base_afe *afe) rfree(afe->irqs); afe->irqs = NULL; - return 0; } + diff --git a/src/include/sof/drivers/afe-drv.h b/src/include/sof/drivers/afe-drv.h index f0825a363..148dc6b80 100644 --- a/src/include/sof/drivers/afe-drv.h +++ b/src/include/sof/drivers/afe-drv.h @@ -141,7 +141,7 @@ extern struct mtk_base_afe_platform mtk_afe_platform; struct mtk_base_afe *afe_get(void); int afe_probe(struct mtk_base_afe *afe); -int afe_remove(struct mtk_base_afe *afe); +void afe_remove(struct mtk_base_afe *afe); /* dai operation */ int afe_dai_get_config(struct mtk_base_afe *afe, int id, unsigned int *channel, unsigned int *rate,