mirror of https://github.com/thesofproject/sof.git
drivers: mtk: refine afe_remove return value
the afe_remove return value is no used, so change afe_remove return value from int to void Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
This commit is contained in:
parent
492821a9f7
commit
7b5aa72813
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue