Re: [PATCH 2/2] ASoC: imx-audmix: fix object reference leaks in probe

From: Daniel Baluta
Date: Tue Apr 09 2019 - 06:09:03 EST


On Tue, Apr 9, 2019 at 11:36 AM Viorel Suman <viorel.suman@xxxxxxx> wrote:
>
> Release the reference to the underlying device taken
> by of_find_device_by_node() call.
>
> Signed-off-by: Viorel Suman <viorel.suman@xxxxxxx>

Please add here the Reported-by tag pointing to Julia.

> ---
> sound/soc/fsl/imx-audmix.c | 31 +++++++++++--------------------
> 1 file changed, 11 insertions(+), 20 deletions(-)
>
> diff --git a/sound/soc/fsl/imx-audmix.c b/sound/soc/fsl/imx-audmix.c
> index 7983bd3..7c24095 100644
> --- a/sound/soc/fsl/imx-audmix.c
> +++ b/sound/soc/fsl/imx-audmix.c
> @@ -20,10 +20,7 @@
> #include "fsl_audmix.h"
>
> struct imx_audmix {
> - struct platform_device *pdev;
> struct snd_soc_card card;
> - struct platform_device *audmix_pdev;
> - struct platform_device *out_pdev;

I am not sure why are you removing these members here. It doesn't seem to match
with patch description. If these are needed to simplify the code please do it in
another patch.

This patch should only fix one problem and that is the refleak.

thanks,
Daniel.