diff mbox series

[v2,1/4] ASoC: arizona: Fix a wrong free in wm8997_probe

Message ID 20201111130923.220186-2-zhangqilong3@huawei.com (mailing list archive)
State New, archived
Headers show
Series ASoC: Fix error handling in wm899x | expand

Commit Message

Zhang Qilong Nov. 11, 2020, 1:09 p.m. UTC
In the normal path, we should not free the arizona,
we should return immediately. It will be free when
call remove operation.

Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
Reported-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
---
 sound/soc/codecs/wm8997.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Richard Fitzgerald Nov. 11, 2020, 1:24 p.m. UTC | #1
On 11/11/2020 13:09, Zhang Qilong wrote:
> In the normal path, we should not free the arizona,
> we should return immediately. It will be free when
> call remove operation.
> 
> Fixes: 31833ead95c2c ("ASoC: arizona: Move request of speaker IRQs into bus probe")
> Reported-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
> ---
>   sound/soc/codecs/wm8997.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
> index 37e4bb3dbd8a..229f2986cd96 100644
> --- a/sound/soc/codecs/wm8997.c
> +++ b/sound/soc/codecs/wm8997.c
> @@ -1177,6 +1177,8 @@ static int wm8997_probe(struct platform_device *pdev)
>   		goto err_spk_irqs;
>   	}
>   
> +	return ret;
> +
>   err_spk_irqs:
>   	arizona_free_spk_irqs(arizona);
>   
> 

Acked-by: Richard Fitzgerald <rf@opensource.cirrus.com>
diff mbox series

Patch

diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
index 37e4bb3dbd8a..229f2986cd96 100644
--- a/sound/soc/codecs/wm8997.c
+++ b/sound/soc/codecs/wm8997.c
@@ -1177,6 +1177,8 @@  static int wm8997_probe(struct platform_device *pdev)
 		goto err_spk_irqs;
 	}
 
+	return ret;
+
 err_spk_irqs:
 	arizona_free_spk_irqs(arizona);